code: def __sub__(graph, other):
      """Removes the given object(s) from the graph
  
      @param other: if it is an integer, removes the vertex with the given
        ID from the graph (note that the remaining vertices will get
        re-indexed!). If it is a tuple, removes the given edge. If it is
        a graph, takes the difference of the two graphs. Accepts
        lists of integers or lists of tuples as well, but they can't be
        mixed! Also accepts L{Edge} and L{EdgeSeq} objects.
      """
      # Deferred import to avoid cycles
      from igraph import Graph
  
      if isinstance(other, Graph):
          return graph.difference(other)
  
      result = graph.copy()
      if isinstance(other, (int, str)):
          result.delete_vertices([other])
      elif isinstance(other, tuple) and len(other) == 2:
          result.delete_edges([other])
      elif isinstance(other, list):
          if len(other) > 0:
              if isinstance(other[0], tuple):
                  result.delete_edges(other)
              elif isinstance(other[0], (int, str)):
                  result.delete_vertices(other)
              else:
                  return NotImplemented
          else:
              return result
      elif isinstance(other, Vertex):
          result.delete_vertices(other)
      elif isinstance(other, VertexSeq):
          result.delete_vertices(other)
      elif isinstance(other, Edge):
          result.delete_edges(other)
      elif isinstance(other, EdgeSeq):
          result.delete_edges(other)
      else:
          return NotImplemented
  
      return result
  
file_path: python-igraph/src/igraph/operators/methods.py
imports: from igraph._igraph import GraphBase, Vertex, Edge
  from igraph.seq import VertexSeq, EdgeSeq
  from igraph.operators.functions import disjoint_union, union, intersection
label_desc: Use image node_id 8 for calling a global function with example usage: __sub__(graph, other) and returns: result, graph, result, NotImplemented, NotImplemented