code: def _add_edges(graph, es, attributes=None):
      """Adds some edges to the graph.
  
      @param es: the list of edges to be added. Every edge is represented
        with a tuple containing the vertex IDs or names of the two
        endpoints. Vertices are enumerated from zero.
      @param attributes: dict of sequences, all of length equal to the
        number of edges to be added, containing the attributes of the new
        edges.
      """
      eid = graph.ecount()
      res = GraphBase.add_edges(graph, es)
      n = graph.ecount() - eid
      if (attributes is not None) and (n > 0):
          for key, val in attributes.items():
              graph.es[eid:][key] = val
      return res
  
file_path: python-igraph/src/igraph/basic.py
imports: from igraph._igraph import GraphBase
  from igraph.seq import EdgeSeq
  from igraph.utils import deprecated
label_desc: Use image node_id 2 for calling a global function with example usage: _add_edges(graph, es, attributes) and returns: res