input: Write a python function to calculate the average age from a list of dictionaries.
  assert average_age([{'age': 20}, {'age': 25}, {'age': 30}]) == 25.0
  assert average_age([{'age': 10}, {'age': 20}, {'age': 30}, {'age': 40}]) == 25.0
  assert average_age([{'age': 24}, {'age': 26}, {'age': 28}, {'age': 30}]) == 27.0
output: def average_age(data):
      total_age = sum(d['age'] for d in data)
      count = len(data)
      return total_age / count