code: def put(self, key, value):
      '''Stores the object `value` named by `key`self.
         DirectoryTreeDatastore stores a directory entry.
      '''
      super(DirectoryTreeDatastore, self).put(key, value)
  
      str_key = str(key)
  
      # ignore root
      if str_key == '/':
        return
  
      # retrieve directory, to add entry
      dir_key = key.parent.instance('directory')
      directory = self.directory(dir_key)
  
      # ensure key is in directory
      if str_key not in directory:
        directory.append(str_key)
        super(DirectoryTreeDatastore, self).put(dir_key, directoryf put(self, key, value):
      '''Stores the object `value` named by `key`self.
         DirectoryTreeDatastore stores a directory entry.
      '''
      super(DirectoryTreeDatastore, self).put(key, value)
  
      str_key = str(key)
  
      # ignore root
      if str_key == '/':
        return
  
      # retrieve directory, to add entry
      dir_key = key.parent.instance('directory')
      directory = self.directory(dir_key)
  
      # ensure key is in directory
      if str_key not in directory:
        directory.append(str_key)
        super(DirectoryTreeDatastore, self).put(dir_key, directory)
docs: Stores the object `value` named by `key`self.
         DirectoryTreeDatastore stores a directory entry.