<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract_events(bill):
 """ Returns all events from legislation. Thing of this as a log for congress. There are alot of events that occur around legislation. For now we are going to kepe it simple. Introduction, cosponsor, votes dates """

    events = []
    #logger.debug(events)

    bill_id = bill.get('bill_id', None)
    if bill_id:
        for event in bill.get('actions', []):
            e = []
            e.append(bill_id)
            e.append(event.get('acted_at', None))
            e.append(event.get('how', None))
            e.append(event.get('result', None))
            e.append(event.get('roll', None))
            e.append(event.get('status', None))
            e.append(event.get('suspension', False))
            e.append(event.get('text', None))
            e.append(event.get('type', None))
            e.append(event.get('vote_type', None))
            e.append(event.get('where', None))
            e.append(event.get('calander', None))
            e.append(event.get('number', None))
            e.append(event.get('under', None))
            e.append(event.get('committee', None))
            e.append(event.get('committees', []))
            events.append(e)
    #logger.debug(events)

    return events