code: def event_table(events):
      
      table = formatting.Table([
          "Id",
          "Start Date",
          "End Date",
          "Subject",
          "Status",
          "Acknowledged",
          "Updates",
          "Impacted Resources"
      ], title="Upcoming Events")
      table.align['Subject'] = 'l'
      table.align['Impacted Resources'] = 'l'
      for event in events:
          table.add_row([
              event.get('id'),
              utils.clean_time(event.get('startDate')),
              utils.clean_time(event.get('endDate')),
              # Some subjects can have \r\n for some reason.
              utils.clean_splitlines(event.get('subject')),
              utils.lookup(event, 'statusCode', 'name'),
              event.get('acknowledgedFlag'),
              event.get('updateCount'),
              event.get('impactedResourceCount')
          ])
      return table
docs: Formats a table for events