input: def common_elements(list1: List[int], list2: List[int]) -> List[int]:
      """Takes two lists as input and returns a new list containing only the common elements.
      >>> common_elements([1, 2, 3, 4, 8], [2, 6, 8, 10])
      [2, 8]
      """
output:     set1 = set(list1)
      set2 = set(list2)
      return list(set1 & set2)