code: def _get_edge_dict(self):
          
          edge_dict = collections.defaultdict(lambda: [])
          if len(self._edges) > 0:
              for e in self._edges:
                  data = e['data']
                  key = tuple([data['i'], data['source'],
                              data['target'], data['polarity']])
                  edge_dict[key] = data['id']
          return edge_dict
docs: Return a dict of edges.
  
          Keyed tuples of (i, source, target, polarity)
          with lists of edge ids [id1, id2, ...]