<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def event_table(events):
 """Formats a table for 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