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: For a given non-root node, access a child element by identifier.
  
  If the node is a root node, you may also access elements using
  either tuple format or the 'A.B.C' string format.
docstr_tok: ["For","a","given","non-root","node",",","access","a","child","element","by","identifier",".","If","the","node","is","a","root","node",",","you","may","also","access","elements","using","either","tuple","format","or","the","'","A.B.C","'","string","format","."]
code: def __getitem__(self, identifier):
      """
      For a given non-root node, access a child element by identifier.
  
      If the node is a root node, you may also access elements using
      either tuple format or the 'A.B.C' string format.
      """
      split_label = (
          tuple(identifier.split("."))
          if isinstance(identifier, str)
          else tuple(identifier)
      )
      if len(split_label) == 1:
          identifier = split_label[0]
          if identifier in self.children:
              return self.__dict__[identifier]
          else:
              raise KeyError(identifier)
      path_item = self
      for identifier in split_label:
          path_item = path_item[identifier]
      return path_item
  
imports: from .None import util
  from .pprint import PrettyPrinter
label_desc: Use image node_id 13 for calling the AttrTree obj's underlying member method code with example usage: obj.__getitem__(identifier) and returns: path_item, self