if (citation.doi_url==cit.doi_urland[citation.doi_url,node.doi_url]notinedges):
# adds edges between citation and reference group
edges.append([citation.doi_url,node.doi_url])
'''
if (node.group=="height"):
fornodeinnodes:#iterates over all nodes in the set of nodes
forreferenceinnode.references:
if (node.group=="depth"):#checks if the node has group depth (=is a reference from a paper)
forrefinnodes:
forcitationinnode.citations:#iterates over the papers that this paper is cited by
if (reference.doi_url==ref.doi_urland[node.doi_url,reference.doi_url]notinedges):
forcitinnodes:#iterates over all nodes in set of nodes
edges.append([node.doi_url,reference.doi_url])
if (citation.doi_url==cit.doi_urland[citation.doi_url,node.doi_url]notinedges):#checks if there is already a related node that is in the set of nodes
edges.append([citation.doi_url,node.doi_url])# creates an edge between them
if (node.group=="height"):#checks if the node has group height (=is a citation from a paper)
forreferenceinnode.references:#iterates over the papers that this is paper references
# adds a node for every publication unknown
forrefinnodes:#iterates over all nodes in set of nodes
# adds edges for references between publications
if (reference.doi_url==ref.doi_urland[node.doi_url,reference.doi_url]notinedges):#checks if there is already a related node that is in the set of nodes
edges.append([node.doi_url,reference.doi_url])#creates an edge between them