code: def is_edge_consistent(graph, u, v):
      
      if not graph.has_edge(u, v):
          raise ValueError('{} does not contain an edge ({}, {})'.format(graph, u, v))
  
      return 0 == len(set(d[RELATION] for d in graph.edge[u][v].values()))
docs: Check if all edges between two nodes have the same relation.
  
      :param pybel.BELGraph graph: A BEL Graph
      :param tuple u: The source BEL node
      :param tuple v: The target BEL node
      :return: If all edges from the source to target node have the same relation
      :rtype: bool