class_docstr: The base class for nodes and leaves.
class_docstr_tok: ["The","base","class","for","nodes","and","leaves","."]
docstr: Returns the previous leaf in the parser tree.
  Returns `None` if this is the first element in the parser tree.
code: def get_previous_leaf(self):
      """
      Returns the previous leaf in the parser tree.
      Returns `None` if this is the first element in the parser tree.
      """
      if self.parent is None:
          return None
  
      node = self
      while True:
          c = node.parent.children
          i = c.index(node)
          if i == 0:
              node = node.parent
              if node.parent is None:
                  return None
          else:
              node = c[i - 1]
              break
  
      while True:
          try:
              node = node.children[-1]
          except AttributeError:  # A Leaf doesn't have children.
              return node
  
imports: from abc import abstractmethod, abstractproperty
  from typing import List, Optional, Tuple, Union
  from parso.utils import split_lines
label_desc: Use image node_id 4 for calling the NodeOrLeaf obj's underlying member method code with example usage: obj.get_previous_leaf() and returns: None, None, node