code: def prepare_queues(queues, lock):
      
      for queue in queues:
          queue._pebble_lock = lock
          with queue.mutex:
              queue._pebble_old_method = queue._put
              queue._put = MethodType(new_method, queue)
docs: Replaces queue._put() method in order to notify the waiting Condition.