code: def _produce_response(self, key, response):
          
          self._lock.acquire()
          try:
              latches = self._latches_by_key.pop(key)
              count = len(latches)
              for latch in latches:
                  latch.put(response)
          finally:
              self._lock.release()
          return count
docs: Reply to every waiting request matching a configuration key with a
          response dictionary, deleting the list of waiters when done.
  
          :param str key:
              Result of :meth:`key_from_dict`
          :param dict response:
              Response dictionary
          :returns:
              Number of waiters that were replied to.