code: def _canceller_for(self, elts, event):
          
          def canceller():
              """Cancels submission of ``elts`` as part of this bundle.
  
              Returns:
                 bool: ``False`` if any of elements had already been sent,
                 otherwise ``True``.
              """
              try:
                  self._event_deque.remove(event)
                  self._in_deque.remove(elts)
                  return True
              except ValueError:
                  return False
  
          return canceller
docs: Obtains a cancellation function that removes elts.
  
          The returned cancellation function returns ``True`` if all elements
          was removed successfully from the _in_deque, and false if it was not.