class_docstr: An abstract base class for a ``Tree`` that automatically maintains
  pointers to parent nodes.  These parent pointers are updated
  whenever any change is made to a tree's structure.  Two subclasses
  are currently defined:
  
    - ``ParentedTree`` is used for tree structures where each subtree
      has at most one parent.  This class should be used in cases
      where there is no"sharing" of subtrees.
  
    - ``MultiParentedTree`` is used for tree structures where a
      subtree may have zero or more parents.  This class should be
      used in cases where subtrees may be shared.
  
  Subclassing
  ===========
  The ``AbstractParentedTree`` class redefines all operations that
  modify a tree's structure to call two methods, which are used by
  subclasses to update parent information:
  
    - ``_setparent()`` is called whenever a new child is added.
    - ``_delparent()`` is called whenever a child is removed.
class_docstr_tok: ["An","abstract","base","class","for","a","``","Tree","``","that","automatically","maintains","pointers","to","parent","nodes",".","These","parent","pointers","are","updated","whenever","any","change","is","made","to","a","tree","'s","structure",".","Two","subclasses","are","currently","defined",":","-","``","ParentedTree","``","is","used","for","tree","structures","where","each","subtree","has","at","most","one","parent",".","This","class","should","be","used","in","cases","where","there","is","no","''","sharing","''","of","subtrees",".","-","``","MultiParentedTree","``","is","used","for","tree","structures","where","a","subtree","may","have","zero","or","more","parents",".","This","class","should","be","used","in","cases","where","subtrees","may","be","shared",".","Subclassing","===========","The","``","AbstractParentedTree","``","class","redefines","all","operations","that","modify","a","tree","'s","structure","to","call","two","methods",",","which","are","used","by","subclasses","to","update","parent","information",":","-","``","_setparent","(",")","``","is","called","whenever","a","new","child","is","added",".","-","``","_delparent","(",")","``","is","called","whenever","a","child","is","removed","."]
docstr: Method used by the pickle module when un-pickling.
  This method provides the arguments passed to ``__new__``
  upon un-pickling. Without this method, ParentedTree instances
  cannot be pickled and unpickled in Python 3.7+ onwards.
  
  :return: Tuple of arguments for ``__new__``, i.e. the label
      and the children of this node.
  :rtype: Tuple[Any, List[AbstractParentedTree]]
code: def __getnewargs__(self):
      """Method used by the pickle module when un-pickling.
      This method provides the arguments passed to ``__new__``
      upon un-pickling. Without this method, ParentedTree instances
      cannot be pickled and unpickled in Python 3.7+ onwards.
  
      :return: Tuple of arguments for ``__new__``, i.e. the label
          and the children of this node.
      :rtype: Tuple[Any, List[AbstractParentedTree]]
      """
      return (self._label, list(self))
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from nltk.tree.tree import Tree
  from nltk.util import slice_bounds
label_desc: Use image node_id 11 for calling the AbstractParentedTree obj's underlying member method code with example usage: obj.__getnewargs__() and returns: self,  list