code: def pop(self, key, resource_type):
          
          with self._objects_queue_lock:
              objects = self._objects_queue[key].get(resource_type, [])
              return objects.pop() if objects else None
docs: Extract an object from the list.
          If the key is not in the cache, this will raise a KeyError.
          If the list is empty, method will return None