input: Write a function that generates a Python program which takes two lists as input and returns a new list containing only the common elements of both lists, without any element repetitions. The function should have the following function signature: `def common_elements(list1, list2):`.
  
  assert common_elements([1, 2, 3, 4, 8], [2, 6, 8, 10])==[2, 8]
  assert common_elements([1, 3, 4, 2], [2, 4, 2, 3])==[2, 3, 4]
  assert common_elements([5, 7, 9], [9, 5, 7, 5])==[5, 7, 9]
  assert common_elements([], [4, 5, 6])==[]
  assert common_elements([1, 1, 1, 1], [1, 1, 1])==[1]
output: def common_elements(list1, list2):
      return list(set(list1) & set(list2))