input: Write a python function to find the most common pet type in each region from the given data.
  assert find_most_common_pet([[1, "Dog"], [1, "Dog"], [2, "Cat"], [2, "Cat"], [2, "Bird"], [3, "Fish"]]) == {1: "Dog", 2: "Cat", 3: "Fish"}
  assert find_most_common_pet([[1, "Cat"], [1, "Dog"], [2, "Cat"], [2, "Cat"], [3, "Fish"], [3, "Fish"], [3, "Fish"]]) == {1: "Cat", 2: "Cat", 3: "Fish"}
  assert find_most_common_pet([[1, "Dog"], [1, "Dog"], [2, "Cat"], [2, "Bird"], [2, "Bird"], [3, "Fish"], [3, "Fish"], [3, "Fish"], [3, "Dog"]]) == {1: "Dog", 2: "Bird", 3: "Fish"}
output: def find_most_common_pet(data):
      from collections import defaultdict, Counter
  
      region_pets = defaultdict(list)
      for region, pet in data:
          region_pets[region].append(pet)
  
      most_common_pets = {}
      for region, pets in region_pets.items():
          most_common_pets[region] = Counter(pets).most_common(1)[0][0]
  
      return most_common_pets