input: Write a function to generate sample data for a web application using Python's faker library. The output should contain three columns of data: name, email, and age. The function should return the generated data as a list of tuples where each tuple contains a name, an email, and an age. If the input number of rows is not specified, the default number of rows should be 10.
  assert generate_sample_data()==[('Mary Johnson', 'mary.johnson@example.com', 25), ('Susan Brown', 'susan.brown@example.com', 29), ('Elizabeth Davis', 'elizabeth.davis@example.com', 20), ('William Wilson', 'william.wilson@example.com', 56), ('James Miller', 'james.miller@example.com', 44), ('Robert Anderson', 'robert.anderson@example.com', 33), ('John Thomas', 'john.thomas@example.com', 38), ('Michael Jackson', 'michael.jackson@example.com', 30), ('David White', 'david.white@example.com', 51), ('Joseph Harris', 'joseph.harris@example.com', 21)]
  assert generate_sample_data(5)==[('Patricia Martin', 'patricia.martin@example.com', 28), ('Linda Thompson', 'linda.thompson@example.com', 42), ('Charles Garcia', 'charles.garcia@example.com', 59), ('Jennifer Robinson', 'jennifer.robinson@example.com', 35), ('Barbara Lewis', 'barbara.lewis@example.com', 54)]
  assert generate_sample_data(0)==[]
output: def generate_sample_data(num_rows=10):
      from faker import Faker
      fake = Faker()
      data = []
      for _ in range(num_rows):
          name = fake.name()
          email = fake.email()
          age = fake.random_int(min=18, max=65)
          data.append((name, email, age))
      return data