docs: def setedge(delta, is_multigraph, graph, orig, dest, idx, exists):
      """Change a delta to say that an edge was created or deleted"""
      if is_multigraph(graph):
          delta.setdefault(graph, {}).setdefault('edges', {})\
              .setdefault(orig, {}).setdefault(dest, {})[idx] = bool(exists)
      else:
          delta.setdefault(graph, {}).setdefault('edges', {})\
              .setdefault(orig, {})[dest] = bool(exists)