input: Write a function to find the most common elements in an array of integers. Return a list of the elements that have the highest frequency. If multiple elements have the same highest frequency, include all of them.
  
  def most_common(nums):
      counts = {}
      for num in nums:
          if num not in counts:
              counts[num] = 0
          counts[num] += 1
      max_count = max(counts.values())
      return [num for num, count in counts.items() if count == max_count]
  
  assert most_common([3, 4, 1, 2, 5, 3, 3])==[3]
  assert most_common([3, 4, 1, 2, 5, 3, 4])==[3, 4]
  assert most_common([1, 2, 3, 4, 5])==[1, 2, 3, 4, 5]
  assert most_common([5, 5, 5, 2, 2, 2])==[5, 2]
  assert most_common([])==[]
output: def most_common(nums):
      counts = {}
      for num in nums:
          if num not in counts:
              counts[num] = 0
          counts[num] += 1
      if not counts:
          return []
      max_count = max(counts.values())
      return [num for num, count in counts.items() if count == max_count]