input: Write a function that generates sample data for a web application using Python's faker library. The output should be a list of dictionaries, each containing three pieces of information: name, email, and age. The age should be a random integer between 18 and 60. The function should return the list of dictionaries.
  assert generate_sample_data(10)==[{'name': 'John Doe', 'email': 'johndoe@example.com', 'age': 28}, {'name': 'Jane Smith', 'email': 'janesmith@example.com', 'age': 35}, ..., {'name': 'Alice Johnson', 'email': 'alicejohnson@example.com', 'age': 42}]
  assert generate_sample_data(5)==[{'name': 'Bob Brown', 'email': 'bobbrown@example.com', 'age': 50}, {'name': 'Carol White', 'email': 'carolwhite@example.com', 'age': 22}, ..., {'name': 'David Black', 'email': 'davidblack@example.com', 'age': 38}]
output: def generate_sample_data(n):
      from faker import Faker
      import random
      fake = Faker()
      data = []
      for _ in range(n):
          data.append({'name': fake.name(), 'email': fake.email(), 'age': random.randint(18, 60)})
      return data