def get_correlation_graph(graph: BELGraph) -> Graph:
result = Graph()<EOL>for u, v, d in graph.edges(data=True):<EOL><INDENT>if d[RELATION] not in CORRELATIVE_RELATIONS:<EOL><INDENT>continue<EOL><DEDENT>if not result.has_edge(u, v):<EOL><INDENT>result.add_edge(u, v, **{d[RELATION]: True})<EOL><DEDENT>elif d[RELATION] not in result[u][v]:<EOL><INDENT>log.log(<NUM_LIT:5>, '<STR_LIT>', u, v)<EOL>result[u][v][d[RELATION]] = True<EOL>result[v][u][d[RELATION]] = True<EOL><DEDENT><DEDENT>return result<EOL>
Extract an undirected graph of only correlative relationships.