class_docstr: Class representing a sequence of edges in the graph.
  
  This class is most easily accessed by the C{es} field of the
  L{Graph} object, which returns an ordered sequence of all edges in
  the graph. The edge sequence can be refined by invoking the
  L{EdgeSeq.select()} method. L{EdgeSeq.select()} can also be
  accessed by simply calling the L{EdgeSeq} object.
  
  An alternative way to create an edge sequence referring to a given
  graph is to use the constructor directly:
  
    >>> g = Graph.Full(3)
    >>> es = EdgeSeq(g)
    >>> restricted_es = EdgeSeq(g, [0, 1])
  
  The individual edges can be accessed by indexing the edge sequence
  object. It can be used as an iterable as well, or even in a list
  comprehension:
  
    >>> g=Graph.Full(3)
    >>> for e in g.es:
    ...   print(e.tuple)
    ...
    (0, 1)
    (0, 2)
    (1, 2)
    >>> [max(e.tuple) for e in g.es]
    [1, 2, 2]
  
  The edge sequence can also be used as a dictionary where the keys are the
  attribute names. The values corresponding to the keys are the values
  of the given attribute of every edge in the graph:
  
    >>> g=Graph.Full(3)
    >>> for idx, e in enumerate(g.es):
    ...   e["weight"] = idx*(idx+1)
    ...
    >>> g.es["weight"]
    [0, 2, 6]
    >>> g.es["weight"] = range(3)
    >>> g.es["weight"]
    [0, 1, 2]
  
  If you specify a sequence that is shorter than the number of edges in
  the EdgeSeq, the sequence is reused:
  
    >>> g = Graph.Tree(7, 2)
    >>> g.es["color"] = ["red", "green"]
    >>> g.es["color"]
    ['red', 'green', 'red', 'green', 'red', 'green']
  
  You can even pass a single string or integer, it will be considered as a
  sequence of length 1:
  
    >>> g.es["color"] = "red"
    >>> g.es["color"]
    ['red', 'red', 'red', 'red', 'red', 'red']
  
  Some methods of the edge sequences are simply proxy methods to the
  corresponding methods in the L{Graph} object. One such example is
  C{EdgeSeq.is_multiple()}:
  
    >>> g=Graph(3, [(0,1), (1,0), (1,2)])
    >>> g.es.is_multiple()
    [False, True, False]
    >>> g.es.is_multiple() == g.is_multiple()
    True
docstr: Returns the first edge of the edge sequence that matches some
  criteria.
  
  The selection criteria are equal to the ones allowed by L{VertexSeq.select}.
  See L{VertexSeq.select} for more details.
  
  For instance, to find the first edge with weight larger than 5 in graph C{g}:
  
      >>> g.es.find(weight_gt=5)           #doctest:+SKIP
docstr_tok: ["Returns","the","first","edge","of","the","edge","sequence","that","matches","some","criteria",".","The","selection","criteria","are","equal","to","the","ones","allowed","by","L","{","VertexSeq.select","}",".","See","L","{","VertexSeq.select","}","for","more","details",".","For","instance",",","to","find","the","first","edge","with","weight","larger","than","5","in","graph","C","{","g","}",":",">",">",">","g.es.find","(","weight_gt=5",")","#","doctest",":","+SKIP"]
code: def find(self, *args, **kwds):
      """Returns the first edge of the edge sequence that matches some
      criteria.
  
      The selection criteria are equal to the ones allowed by L{VertexSeq.select}.
      See L{VertexSeq.select} for more details.
  
      For instance, to find the first edge with weight larger than 5 in graph C{g}:
  
          >>> g.es.find(weight_gt=5)           #doctest:+SKIP
      """
      if args:
          # Selecting first based on positional arguments, then checking
          # the criteria specified by the keyword arguments
          edge = _EdgeSeq.find(self, *args)
          if not kwds:
              return edge
          es = self.graph.es.select(edge.index)
      else:
          es = self
  
      # Selecting based on positional arguments
      es = es.select(**kwds)
      if es:
          return es[0]
      raise ValueError("no such edge")
  
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 the EdgeSeq obj's underlying member method code with example usage: obj.find() and returns: es, edge