def extract_ast_species(ast):
species_id = "<STR_LIT:None>"<EOL>species_label = "<STR_LIT:None>"<EOL>species = [<EOL>(species_id, species_label) for (species_id, species_label) in ast.species if species_id<EOL>]<EOL>if len(species) == <NUM_LIT:1>:<EOL><INDENT>(species_id, species_label) = species[<NUM_LIT:0>]<EOL><DEDENT>if not species_id:<EOL><INDENT>species_id = "<STR_LIT:None>"<EOL>species_label = "<STR_LIT:None>"<EOL><DEDENT>log.debug(f"<STR_LIT>")<EOL>return (species_id, species_label)<EOL>
Extract species from ast.species set of tuples (id, label)