input: Write a function to generate sample data for a web application using Python's faker library. The function should return a list of dictionaries where each dictionary contains three fields: name, email, and age. The age should be a random integer between 18 and 60.
  assert generate_sample_data(10)==[{'name': 'John Smith', 'email': 'john.smith@example.com', 'age': 34}, {'name': 'Mary Jones', 'email': 'mary.jones@example.net', 'age': 52}, {'name': 'David Brown', 'email': 'david.brown@example.org', 'age': 29}, {'name': 'Susan White', 'email': 'susan.white@example.com', 'age': 45}, {'name': 'Michael Black', 'email': 'michael.black@example.net', 'age': 37}, {'name': 'Linda Green', 'email': 'linda.green@example.org', 'age': 19}, {'name': 'Robert Blue', 'email': 'robert.blue@example.com', 'age': 56}, {'name': 'Patricia Yellow', 'email': 'patricia.yellow@example.net', 'age': 31}, {'name': 'James Orange', 'email': 'james.orange@example.org', 'age': 48}, {'name': 'Barbara Purple', 'email': 'barbara.purple@example.com', 'age': 23}]
  assert generate_sample_data(0)==[]
  assert generate_sample_data(1)==[{'name': 'Joseph Gray', 'email': 'joseph.gray@example.net', 'age': 27}]
output: 
  def generate_sample_data(n):
      from faker import Faker
      import random
      fake = Faker()
      return [{'name': fake.name(), 'email': fake.email(), 'age': random.randint(18, 60)} for _ in range(n)]
  