def extract_cosponsors(bill):
    """
    Return a list of list relating cosponsors to legislation.
    """
    logger.debug("Extracting Cosponsors")
    cosponsor_map = []
    cosponsors = bill.get('cosponsors', [])
    bill_id = bill.get('bill_id', None)

    for co in cosponsors:
        co_list = []
        co_list.append(co.get('thomas_id'))
        co_list.append(bill_id)
        co_list.append(co.get('district'))
        co_list.append(co.get('state'))
        cosponsor_map.append(co_list)

    logger.debug("End Extractioning Cosponsors")

    return cosponsor_map
def extract_cosponsors ( bill ) : logger . debug ( "Extracting Cosponsors" ) cosponsor_map = [ ] cosponsors = bill . get ( 'cosponsors' , [ ] ) bill_id = bill . get ( 'bill_id' , None ) for co in cosponsors : co_list = [ ] co_list . append ( co . get ( 'thomas_id' ) ) co_list . append ( bill_id ) co_list . append ( co . get ( 'district' ) ) co_list . append ( co . get ( 'state' ) ) cosponsor_map . append ( co_list ) logger . debug ( "End Extractioning Cosponsors" ) return cosponsor_map
Return a list of list relating cosponsors to legislation.