input: Write a function to generate sample data for a web application using the faker library in Python. This function should output a list of dictionaries, where each dictionary contains the keys 'name', 'email', and 'age', with corresponding fake data generated using faker library. The function should take an integer parameter called 'num_samples' which specifies how many samples to generate.
  assert generate_sample_data(3) == [{'name': 'John Doe', 'email': 'johndoe@example.com', 'age': 25}, {'name': 'Jane Smith', 'email': 'janesmith@example.com', 'age': 45}, {'name': 'Alan Turing', 'email': 'alanturing@example.com', 'age': 32}]
  assert generate_sample_data(0) == []
  assert generate_sample_data(2) == [{'name': 'Bob Johnson', 'email': 'bobjohnson@example.com', 'age': 50}, {'name': 'Emily White', 'email': 'emilywhite@example.com', 'age': 28}]
output: def generate_sample_data(num_samples):
      from faker import Faker
      fake = Faker()
      return [{'name': fake.name(), 'email': fake.email(), 'age': fake.random_int(min=18, max=65)} for _ in range(num_samples)]