<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pop(self, key, resource_type):
 """ 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 """

        with self._objects_queue_lock:
            objects = self._objects_queue[key].get(resource_type, [])
            return objects.pop() if objects else None