<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def metadata(self, name):
 """Return value and metadata associated with the named value Parameters name : str name to retrieve. If the name contains '.'s it will be retrieved recursively Raises ------ KeyError if name is not defined in the ConfigTree """

        if name in self._children:
            return self._children[name].metadata()
        else:
            head, _, tail = name.partition('.')
            if head in self._children:
                return self._children[head].metadata(key=tail)
            else:
                raise KeyError(name)