original_docstring: Remove messages from lease management.
docstring: Remove messages from lease management.
docstring_tokens: Remove messages from lease management .
code: def remove(
          self,
          items: Iterable[
              Union[requests.AckRequest, requests.DropRequest, requests.NackRequest]
          ],
      ) -> None:
          """Remove messages from lease management."""
          with self._add_remove_lock:
              # Remove the ack ID from lease management, and decrement the
              # byte counter.
              for item in items:
                  if self._leased_messages.pop(item.ack_id, None) is not None:
                      self._bytes -= item.byte_size
                  else:
                      _LOGGER.debug("Item %s was not managed.", item.ack_id)
  
              if self._bytes < 0:
                  _LOGGER.debug("Bytes was unexpectedly negative: %d", self._bytes)
                  self._bytes = 0
code_tokens: def remove ( self , items : Iterable [ Union [ requests . AckRequest , requests . DropRequest , requests . NackRequest ] ] , ) -> None : with self . _add_remove_lock : for item in items : if self . _leased_messages . pop ( item . ack_id , None ) is not None : self . _bytes -= item . byte_size else : _LOGGER . debug ( "Item %s was not managed." , item . ack_id ) if self . _bytes < 0 : _LOGGER . debug ( "Bytes was unexpectedly negative: %d" , self . _bytes ) self . _bytes = 0
short_docstring: Remove messages from lease management.
short_docstring_tokens: Remove messages from lease management .
comment: """Remove messages from lease management."""$SEP$# Remove the ack ID from lease management, and decrement the$SEP$# byte counter.