parameters: (processor: AbstractProcessor)
docstring: A default generator for a switch exit event. If the processor is a
      SwitchableProcessor, this generator will switch it. Otherwise nothing will
      happen.
docstring_summary: A default generator for a switch exit event. If the processor is a
      SwitchableProcessor, this generator will switch it. Otherwise nothing will
      happen.
docstring_tokens: A default generator for a switch exit event . If the processor is a SwitchableProcessor this generator will switch it . Otherwise nothing will happen .
function: def default_switch_generator(processor: AbstractProcessor):
      """
      A default generator for a switch exit event. If the processor is a
      SwitchableProcessor, this generator will switch it. Otherwise nothing will
      happen.
      """
      is_switchable = isinstance(processor, SwitchableProcessor)
      while True:
          if is_switchable:
              yield processor.switch()
          else:
              yield False
function_tokens: def default_switch_generator ( processor : AbstractProcessor ) : is_switchable = isinstance ( processor , SwitchableProcessor ) while True : if is_switchable : yield processor . switch ( ) else : yield False