code: def _add_proxy_methods():
      # Proxy methods for VertexSeq and EdgeSeq that forward their arguments to
      # the corresponding Graph method are constructed here. Proxy methods for
      # Vertex and Edge are added in the C source code. Make sure that you update
      # the C source whenever you add a proxy method here if that makes sense for
      # an individual vertex or edge
      decorated_methods = {}
      decorated_methods[VertexSeq] = [
          "degree",
          "betweenness",
          "bibcoupling",
          "closeness",
          "cocitation",
          "constraint",
          "distances",
          "diversity",
          "eccentricity",
          "get_shortest_paths",
          "maxdegree",
          "pagerank",
          "personalized_pagerank",
          "shortest_paths",
          "similarity_dice",
          "similarity_jaccard",
          "subgraph",
          "indegree",
          "outdegree",
          "isoclass",
          "delete_vertices",
          "is_separator",
          "is_minimal_separator",
      ]
      decorated_methods[EdgeSeq] = [
          "count_multiple",
          "delete_edges",
          "is_loop",
          "is_multiple",
          "is_mutual",
          "subgraph_edges",
      ]
  
      rename_methods = {}
      rename_methods[VertexSeq] = {"delete_vertices": "delete"}
      rename_methods[EdgeSeq] = {
          "delete_edges": "delete",
          "subgraph_edges": "subgraph",
      }
  
      for cls, methods in decorated_methods.items():
          for method in methods:
              new_method_name = rename_methods[cls].get(method, method)
              setattr(cls, new_method_name, _graphmethod(None, method))
  
      EdgeSeq.edge_betweenness = _graphmethod(
          lambda self, result: [result[i] for i in self.indices],
          "edge_betweenness",
      )
  
file_path: python-igraph/src/igraph/seq.py
imports: import operator
  from igraph._igraph import EdgeSeq, VertexSeq
label_desc: Use image node_id 2 for calling a global function with example usage: _add_proxy_methods() without return types