input: Write a function to generate a sorted calendar of events.
  assert generate_calendar(['May 15', 'June 22', 'July 8']) == 'May 15 - Event\nJune 22 - Event\nJuly 8 - Event\n'
  assert generate_calendar(['December 25', 'January 1', 'July 4']) == 'January 1 - Event\nJuly 4 - Event\nDecember 25 - Event\n'
  assert generate_calendar(['November 11', 'April 1', 'October 31']) == 'April 1 - Event\nOctober 31 - Event\nNovember 11 - Event\n'
output: def generate_calendar(dates):
      from datetime import datetime
  
      def convert_date(date_str):
          return datetime.strptime(date_str, "%B %d")
  
      sorted_dates = sorted(dates, key=convert_date)
      return '\n'.join(f"{date} - Event" for date in sorted_dates)