class_docstr: References
  ==========
  
  .. [1] Holt, D., Eick, B., O'Brien, E.
         "Handbook of Computational Group Theory"
         Section 8.1.3
class_docstr_tok: ["References","==========","..","[","1","]","Holt",",","D.",",","Eick",",","B.",",","O'Brien",",","E.","``","Handbook","of","Computational","Group","Theory","''","Section","8.1.3"]
docstr: Return the depth of a given element.
  
  Explanation
  ===========
  
  The depth of a given element ``g`` is defined by
  `\mathrm{dep}[g] = i` if `e_1 = e_2 = \ldots = e_{i-1} = 0`
  and `e_i != 0`, where ``e`` represents the exponent-vector.
  
  Examples
  ========
  
  >>> from sympy.combinatorics.named_groups import SymmetricGroup
  >>> G = SymmetricGroup(3)
  >>> PcGroup = G.polycyclic_group()
  >>> collector = PcGroup.collector
  >>> collector.depth(G[0])
  2
  >>> collector.depth(G[1])
  1
  
  References
  ==========
  
  .. [1] Holt, D., Eick, B., O'Brien, E.
         "Handbook of Computational Group Theory"
         Section 8.1.1, Definition 8.5
docstr_tok: ["Return","the","depth","of","a","given","element",".","Explanation","===========","The","depth","of","a","given","element","``","g","``","is","defined","by","`","\\mathrm","{","dep","}","[","g","]","=","i","`","if","`","e_1","=","e_2","=","\\ldots","=","e_","{","i-1","}","=","0","`","and","`","e_i","!","=","0","`",",","where","``","e","``","represents","the","exponent-vector",".","Examples","========",">",">",">","from","sympy.combinatorics.named_groups","import","SymmetricGroup",">",">",">","G","=","SymmetricGroup","(","3",")",">",">",">","PcGroup","=","G.polycyclic_group","(",")",">",">",">","collector","=","PcGroup.collector",">",">",">","collector.depth","(","G","[","0","]",")","2",">",">",">","collector.depth","(","G","[","1","]",")","1","References","==========","..","[","1","]","Holt",",","D.",",","Eick",",","B.",",","O'Brien",",","E.","``","Handbook","of","Computational","Group","Theory","''","Section","8.1.1",",","Definition","8.5"]
code: def depth(self, element):
      r"""
      Return the depth of a given element.
  
      Explanation
      ===========
  
      The depth of a given element ``g`` is defined by
      `\mathrm{dep}[g] = i` if `e_1 = e_2 = \ldots = e_{i-1} = 0`
      and `e_i != 0`, where ``e`` represents the exponent-vector.
  
      Examples
      ========
  
      >>> from sympy.combinatorics.named_groups import SymmetricGroup
      >>> G = SymmetricGroup(3)
      >>> PcGroup = G.polycyclic_group()
      >>> collector = PcGroup.collector
      >>> collector.depth(G[0])
      2
      >>> collector.depth(G[1])
      1
  
      References
      ==========
  
      .. [1] Holt, D., Eick, B., O'Brien, E.
             "Handbook of Computational Group Theory"
             Section 8.1.1, Definition 8.5
  
      """
      exp_vector = self.exponent_vector(element)
      return next(
          (i + 1 for i, x in enumerate(exp_vector) if x),
          len(self.pcgs) + 1,
      )
  
imports: from sympy.ntheory.primetest import isprime
  from sympy.combinatorics.perm_groups import PermutationGroup
  from sympy.printing.defaults import DefaultPrinting
  from sympy.combinatorics.free_groups import free_group
label_desc: Use image node_id 9 for calling the Collector obj's underlying member method code with example usage: obj.depth(element) and returns: next