class_docstr: An AttrTree offers convenient, multi-level attribute access for
  collections of objects. AttrTree objects may also be combined
  together using the update method or merge classmethod. Here is an
  example of adding a ViewableElement to an AttrTree and accessing it:
  
  >>> t = AttrTree()
  >>> t.Example.Path = 1
  >>> t.Example.Path                             #doctest: +ELLIPSIS
  1
class_docstr_tok: ["An","AttrTree","offers","convenient",",","multi-level","attribute","access","for","collections","of","objects",".","AttrTree","objects","may","also","be","combined","together","using","the","update","method","or","merge","classmethod",".","Here","is","an","example","of","adding","a","ViewableElement","to","an","AttrTree","and","accessing","it",":",">",">",">","t","=","AttrTree","(",")",">",">",">","t.Example.Path","=","1",">",">",">","t.Example.Path","#","doctest",":","+ELLIPSIS","1"]
docstr: identifier: A string identifier for the current node (if any)
  parent:     The parent node (if any)
  items:      Items as (path, value) pairs to construct
              (sub)tree down to given leaf values.
  
  Note that the root node does not have a parent and does not
  require an identifier.
docstr_tok: ["identifier",":","A","string","identifier","for","the","current","node","(","if","any",")","parent",":","The","parent","node","(","if","any",")","items",":","Items","as","(","path",",","value",")","pairs","to","construct","(","sub",")","tree","down","to","given","leaf","values",".","Note","that","the","root","node","does","not","have","a","parent","and","does","not","require","an","identifier","."]
code: def __init__(
      self, items=None, identifier=None, parent=None, dir_mode="default"
  ):
      """
      identifier: A string identifier for the current node (if any)
      parent:     The parent node (if any)
      items:      Items as (path, value) pairs to construct
                  (sub)tree down to given leaf values.
  
      Note that the root node does not have a parent and does not
      require an identifier.
      """
      self.__dict__["parent"] = parent
      self.__dict__["identifier"] = type(self)._sanitizer(
          identifier, escape=False
      )
      self.__dict__["children"] = []
      self.__dict__["_fixed"] = False
      self.__dict__[
          "_dir_mode"
      ] = dir_mode  # Either 'default' or 'user'
  
      fixed_error = "No attribute %r in this AttrTree, and none can be added because fixed=True"
      self.__dict__["_fixed_error"] = fixed_error
      self.__dict__["data"] = {}
      items = items.items() if isinstance(items, dict) else items
      # Python 3
      items = list(items) if items else items
      items = [] if not items else items
      for path, item in items:
          self.set_path(path, item)
  
imports: from .None import util
  from .pprint import PrettyPrinter
label_desc: Use image node_id 3 to create a new AttrTree object  with example: obj = AttrTree(items, identifier, parent, dir_mode)