code: def _get_edges(self):
          
          idset = set([id(x) for x in self.objects])
          self.edges = set([])
          for n in self.objects:
              refset = set([id(x) for x in get_referents(n)])
              for ref in refset.intersection(idset):
                  label = ''
                  members = None
                  if isinstance(n, dict):
                      members = n.items()
                  if not members:
                      members = named_refs(n)
                  for (k, v) in members:
                      if id(v) == ref:
                          label = k
                          break
                  self.edges.add(_Edge(id(n), ref, label))
docs: Compute the edges for the reference graph.
          The function returns a set of tuples (id(a), id(b), ref) if a
          references b with the referent 'ref'.