code: def wait_for_registration(self, processor_type):
          
          with self._condition:
              self._condition.wait_for(lambda: (
                  processor_type in self
                  or self._cancelled_event.is_set()))
              if self._cancelled_event.is_set():
                  raise WaitCancelledException()
docs: Waits for a particular processor type to register or until
          is_cancelled is True. is_cancelled cannot be part of this class
          since we aren't cancelling all waiting for a processor_type,
          but just this particular wait.
  
          Args:
              processor_type (ProcessorType): The family, and version of
                  the transaction processor.
  
          Returns:
              None