code: def get_edge_relations(graph: BELGraph) -> Mapping[Tuple[BaseEntity, BaseEntity], Set[str]]:
      
      return group_dict_set(
          ((u, v), d[RELATION])
          for u, v, d in graph.edges(data=True)
      )
docs: Build a dictionary of {node pair: set of edge types}.