docstr: Returns the nodes and edges on the cycle containing edge i == (p, q)
  when the latter is added to the spanning tree.
  
  The cycle is oriented in the direction from p to q.
docstr_tok: ["Returns","the","nodes","and","edges","on","the","cycle","containing","edge","i","==","(","p",",","q",")","when","the","latter","is","added","to","the","spanning","tree",".","The","cycle","is","oriented","in","the","direction","from","p","to","q","."]
code: def find_cycle(self, i, p, q):
      """
      Returns the nodes and edges on the cycle containing edge i == (p, q)
      when the latter is added to the spanning tree.
  
      The cycle is oriented in the direction from p to q.
      """
      w = self.find_apex(p, q)
      Wn, We = self.trace_path(p, w)
      Wn.reverse()
      We.reverse()
      if We != [i]:
          We.append(i)
      WnR, WeR = self.trace_path(q, w)
      del WnR[-1]
      Wn += WnR
      We += WeR
      return Wn, We
  
imports: from itertools import chain, islice, repeat
  from math import ceil, sqrt
  import networkx
  from networkx.utils import not_implemented_for
label_desc: Use image node_id 5 for calling the _DataEssentialsAndFunctions obj's underlying member method code with example usage: obj.find_cycle(i, p, q) and returns: Wn,  We