def extract_events(bill):
events = []<EOL>bill_id = bill.get('<STR_LIT>', None)<EOL>if bill_id:<EOL><INDENT>for event in bill.get('<STR_LIT>', []):<EOL><INDENT>e = []<EOL>e.append(bill_id)<EOL>e.append(event.get('<STR_LIT>', None))<EOL>e.append(event.get('<STR_LIT>', None))<EOL>e.append(event.get('<STR_LIT:result>', None))<EOL>e.append(event.get('<STR_LIT>', None))<EOL>e.append(event.get('<STR_LIT:status>', None))<EOL>e.append(event.get('<STR_LIT>', False))<EOL>e.append(event.get('<STR_LIT:text>', None))<EOL>e.append(event.get('<STR_LIT:type>', None))<EOL>e.append(event.get('<STR_LIT>', None))<EOL>e.append(event.get('<STR_LIT>', None))<EOL>e.append(event.get('<STR_LIT>', None))<EOL>e.append(event.get('<STR_LIT>', None))<EOL>e.append(event.get('<STR_LIT>', None))<EOL>e.append(event.get('<STR_LIT>', None))<EOL>e.append(event.get('<STR_LIT>', []))<EOL>events.append(e)<EOL><DEDENT><DEDENT>return events<EOL>
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