def __getattr__(self, identifier):
        """
        Access a identifier from the AttrTree or generate a new AttrTree
        with the chosen attribute path.
        """
        try:
            return super(AttrTree, self).__getattr__(identifier)
        except AttributeError: pass

        # Attributes starting with __ get name mangled
        if identifier.startswith('_' + type(self).__name__) or identifier.startswith('__'):
            raise AttributeError('Attribute %s not found.' % identifier)
        elif self.fixed==True:
            raise AttributeError(self._fixed_error % identifier)


        if not any(identifier.startswith(prefix)
                   for prefix in type(self)._disabled_prefixes):
            identifier = type(self)._sanitizer(identifier, escape=False)

        if identifier in self.children:
            return self.__dict__[identifier]

        if not identifier.startswith('_'):
            self.children.append(identifier)
            dir_mode = self.__dict__['_dir_mode']
            child_tree = self.__class__(identifier=identifier,
                                        parent=self, dir_mode=dir_mode)
            self.__dict__[identifier] = child_tree
            return child_tree
        else:
            raise AttributeError
dataset/ETHPy150Open ioam/holoviews/holoviews/core/tree.py/AttrTree.__getattr__/original