code: def _check_rev_dict(tree, ebt):
      
      ebs = defaultdict(dict)
      for edge in ebt.values():
          source_id = edge['@source']
          edge_id = edge['@id']
          ebs[source_id][edge_id] = edge
      assert ebs == tree['edgeBySourceId']
docs: Verifyies that `ebt` is the inverse of the `edgeBySourceId` data member of `tree`