input: Write a python function to calculate age based on a given birthdate.
  assert calculate_age(datetime.date(1996, 6, 11)) == 24
  assert calculate_age(datetime.date(2000, 1, 1)) == 23
  assert calculate_age(datetime.date(2010, 12, 31)) == 12
output: import datetime
  
  def calculate_age(birthdate):
      today = datetime.date.today()
      age = today.year - birthdate.year - ((today.month, today.day) < (birthdate.month, birthdate.day))
      return age