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: Set a value at a child node with given identifier. If at a root
  node, multi-level path specifications is allowed (i.e. 'A.B.C'
  format or tuple format) in which case the behaviour matches
  that of set_path.
docstr_tok: ["Set","a","value","at","a","child","node","with","given","identifier",".","If","at","a","root","node",",","multi-level","path","specifications","is","allowed","(","i.e",".","'","A.B.C'","format","or","tuple","format",")","in","which","case","the","behaviour","matches","that","of","set_path","."]
code: def __setitem__(self, identifier, val):
      """
      Set a value at a child node with given identifier. If at a root
      node, multi-level path specifications is allowed (i.e. 'A.B.C'
      format or tuple format) in which case the behaviour matches
      that of set_path.
      """
      if isinstance(identifier, str) and "." not in identifier:
          self.__setattr__(identifier, val)
      elif isinstance(identifier, str) and self.parent is None:
          self.set_path(tuple(identifier.split(".")), val)
      elif isinstance(identifier, tuple) and self.parent is None:
          self.set_path(identifier, val)
      else:
          raise Exception(
              "Multi-level item setting only allowed from root node."
          )
  
imports: from .None import util
  from .pprint import PrettyPrinter
label_desc: Use image node_id 12 for calling the AttrTree obj's underlying member method code with example usage: obj.__setitem__(identifier, val) without return types