code: def AddLeafNodes(self, prefix, node):
      
      if not node:
        self.AddPath(prefix)
      for name in node:
        child_path = prefix + '.' + name
        self.AddLeafNodes(child_path, node[name])
docs: Adds leaf nodes begin with prefix to this tree.