input: Write a function to find a pair of numbers from a given list that add up to a specified target. If such a pair exists, return it as a list; otherwise, return None. The function should take two arguments: the list of numbers and the target number.
  assert find_pair([1, 2, 3, 4, 4, 5, 6], 8)==[2, 6]
  assert find_pair([1, 2, 3, 4, 4, 5, 7], 8)==[1, 7]
  assert find_pair([1, 2, 3, 4, 4, 5, 6], 12)==None
  assert find_pair([], 8)==None
  assert find_pair([1, 2, 3, 4, 4, 5, 6], 7)==[1, 6]
output: def find_pair(nums, target):
      seen = set()
      for num in nums:
          complement = target - num
          if complement in seen:
              return [complement, num]
          seen.add(num)
      return None