code: def directoryAdd(self, dir_key, key):
      '''Adds directory entry `key` to directory at `dir_key`.
  
      If the directory `dir_key` does not exist, it is created.
      '''
      key = str(key)
  
      dir_items = self.get(dir_key) or []
      if key not in dir_items:
        dir_items.append(key)
        self.put(dir_key, dir_itemsf directoryAdd(self, dir_key, key):
      '''Adds directory entry `key` to directory at `dir_key`.
  
      If the directory `dir_key` does not exist, it is created.
      '''
      key = str(key)
  
      dir_items = self.get(dir_key) or []
      if key not in dir_items:
        dir_items.append(key)
        self.put(dir_key, dir_items)
docs: Adds directory entry `key` to directory at `dir_key`.
  
      If the directory `dir_key` does not exist, it is created.