class_docstr: The Prufer correspondence is an algorithm that describes the
  bijection between labeled trees and the Prufer code. A Prufer
  code of a labeled tree is unique up to isomorphism and has
  a length of n - 2.
  
  Prufer sequences were first used by Heinz Prufer to give a
  proof of Cayley's formula.
  
  References
  ==========
  
  .. [1] https://mathworld.wolfram.com/LabeledTree.html
class_docstr_tok: ["The","Prufer","correspondence","is","an","algorithm","that","describes","the","bijection","between","labeled","trees","and","the","Prufer","code",".","A","Prufer","code","of","a","labeled","tree","is","unique","up","to","isomorphism","and","has","a","length","of","n","-","2",".","Prufer","sequences","were","first","used","by","Heinz","Prufer","to","give","a","proof","of","Cayley","'s","formula",".","References","==========","..","[","1","]","https",":","\/\/mathworld.wolfram.com\/LabeledTree.html"]
docstr: Computes the rank of a Prufer sequence.
  
  Examples
  ========
  
  >>> from sympy.combinatorics.prufer import Prufer
  >>> a = Prufer([[0, 1], [0, 2], [0, 3]])
  >>> a.prufer_rank()
  0
  
  See Also
  ========
  
  rank, next, prev, size
docstr_tok: ["Computes","the","rank","of","a","Prufer","sequence",".","Examples","========",">",">",">","from","sympy.combinatorics.prufer","import","Prufer",">",">",">","a","=","Prufer","(","[","[","0",",","1","]",",","[","0",",","2","]",",","[","0",",","3","]","]",")",">",">",">","a.prufer_rank","(",")","0","See","Also","========","rank",",","next",",","prev",",","size"]
code: def prufer_rank(self):
      """Computes the rank of a Prufer sequence.
  
      Examples
      ========
  
      >>> from sympy.combinatorics.prufer import Prufer
      >>> a = Prufer([[0, 1], [0, 2], [0, 3]])
      >>> a.prufer_rank()
      0
  
      See Also
      ========
  
      rank, next, prev, size
  
      """
      r = 0
      p = 1
      for i in range(self.nodes - 3, -1, -1):
          r += p * self.prufer_repr[i]
          p *= self.nodes
      return r
  
imports: from sympy.core import Basic
  from sympy.core.containers import Tuple
  from sympy.tensor.array import Array
  from sympy.core.sympify import _sympify
  from sympy.utilities.iterables import flatten, iterable
  from sympy.utilities.misc import as_int
  from collections import defaultdict
label_desc: Use image node_id 9 for calling the Prufer obj's underlying member method code with example usage: obj.prufer_rank() and returns: r