code: def directoryRemove(self, dir_key, key):
      '''Removes directory entry `key` from directory at `dir_key`.
  
      If either the directory `dir_key` or the directory entry `key` don't exist,
      this method is a no-op.
      '''
      key = str(key)
  
      dir_items = self.get(dir_key) or []
      if key in dir_items:
        dir_items = [k for k in dir_items if k != key]
        self.put(dir_key, dir_itemsf directoryRemove(self, dir_key, key):
      '''Removes directory entry `key` from directory at `dir_key`.
  
      If either the directory `dir_key` or the directory entry `key` don't exist,
      this method is a no-op.
      '''
      key = str(key)
  
      dir_items = self.get(dir_key) or []
      if key in dir_items:
        dir_items = [k for k in dir_items if k != key]
        self.put(dir_key, dir_items)
docs: Removes directory entry `key` from directory at `dir_key`.
  
      If either the directory `dir_key` or the directory entry `key` don't exist,
      this method is a no-op.