class_docstr: The base class for nodes and leaves.
docstr: Returns the node immediately preceding this node in this parent's
  children list. If this node does not have a previous sibling, it is
  None.
docstr_tok: ["Returns","the","node","immediately","preceding","this","node","in","this","parent's","children","list",".","If","this","node","does","not","have","a","previous","sibling",",","it","is","None","."]
code: def get_previous_sibling(self):
      """
      Returns the node immediately preceding this node in this parent's
      children list. If this node does not have a previous sibling, it is
      None.
      """
      parent = self.parent
      if parent is None:
          return None
  
      # Can't use index(); we need to test by identity
      for i, child in enumerate(parent.children):
          if child is self:
              if i == 0:
                  return None
              return self.parent.children[i - 1]
  
imports: import sys
  from abc import abstractmethod, abstractproperty
  from parso._compatibility import utf8_repr, encoding
  from parso.utils import split_lines
label_desc: Use image node_id 3 for calling the NodeOrLeaf obj's underlying member method code with example usage: obj.get_previous_sibling() and returns: None, self, None