@nullify<EOL>def full_award_groups(soup):
award_groups = []<EOL>funding_group_section = extract_nodes(soup, "<STR_LIT>")<EOL>generated_id_counter = <NUM_LIT:1><EOL>for fg in funding_group_section:<EOL><INDENT>award_group_tags = extract_nodes(fg, "<STR_LIT>")<EOL>for ag in award_group_tags:<EOL><INDENT>if '<STR_LIT:id>' in ag.attrs:<EOL><INDENT>ref = ag['<STR_LIT:id>']<EOL><DEDENT>else:<EOL><INDENT>ref = "<STR_LIT>".format(id=generated_id_counter)<EOL>generated_id_counter += <NUM_LIT:1><EOL><DEDENT>award_group = {}<EOL>award_group_id = award_group_award_id(ag)<EOL>if award_group_id is not None:<EOL><INDENT>award_group['<STR_LIT>'] = first(award_group_id)<EOL><DEDENT>funding_sources = full_award_group_funding_source(ag)<EOL>source = first(funding_sources)<EOL>if source is not None:<EOL><INDENT>copy_attribute(source, '<STR_LIT>', award_group)<EOL>copy_attribute(source, '<STR_LIT>', award_group, '<STR_LIT:id>')<EOL>copy_attribute(source, '<STR_LIT>', award_group, destination_key='<STR_LIT>')<EOL><DEDENT>award_group_by_ref = {}<EOL>award_group_by_ref[ref] = award_group<EOL>award_groups.append(award_group_by_ref)<EOL><DEDENT><DEDENT>return award_groups<EOL>
Find the award-group items and return a list of details