def list_abundance_cartesian_expansion(graph: BELGraph) -> None:
for u, v, k, d in list(graph.edges(keys=True, data=True)):<EOL><INDENT>if CITATION not in d:<EOL><INDENT>continue<EOL><DEDENT>if isinstance(u, ListAbundance) and isinstance(v, ListAbundance):<EOL><INDENT>for u_member, v_member in itt.product(u.members, v.members):<EOL><INDENT>graph.add_qualified_edge(<EOL>u_member, v_member,<EOL>relation=d[RELATION],<EOL>citation=d.get(CITATION),<EOL>evidence=d.get(EVIDENCE),<EOL>annotations=d.get(ANNOTATIONS),<EOL>)<EOL><DEDENT><DEDENT>elif isinstance(u, ListAbundance):<EOL><INDENT>for member in u.members:<EOL><INDENT>graph.add_qualified_edge(<EOL>member, v,<EOL>relation=d[RELATION],<EOL>citation=d.get(CITATION),<EOL>evidence=d.get(EVIDENCE),<EOL>annotations=d.get(ANNOTATIONS),<EOL>)<EOL><DEDENT><DEDENT>elif isinstance(v, ListAbundance):<EOL><INDENT>for member in v.members:<EOL><INDENT>graph.add_qualified_edge(<EOL>u, member,<EOL>relation=d[RELATION],<EOL>citation=d.get(CITATION),<EOL>evidence=d.get(EVIDENCE),<EOL>annotations=d.get(ANNOTATIONS),<EOL>)<EOL><DEDENT><DEDENT><DEDENT>_remove_list_abundance_nodes(graph)<EOL>
Expand all list abundances to simple subject-predicate-object networks.