code: def _parse_trigger(self, trigger_clause):
          
  
          cond = trigger_clause[0]
  
          named_event = None
          explicit_stream = None
          explicit_trigger = None
  
          # Identifier parse tree is Group(Identifier)
          if cond.getName() == 'identifier':
              named_event = cond[0]
          elif cond.getName() == 'stream_trigger':
              trigger_type = cond[0]
              stream = cond[1]
              oper = cond[2]
              ref = cond[3]
  
              trigger = InputTrigger(trigger_type, oper, ref)
              explicit_stream = stream
              explicit_trigger = trigger
          elif cond.getName() == 'stream_always':
              stream = cond[0]
              trigger = TrueTrigger()
              explicit_stream = stream
              explicit_trigger = trigger
          else:
              raise ArgumentError("OnBlock created from an invalid ParseResults object", parse_results=trigger_clause)
  
          return TriggerDefinition(named_event, explicit_stream, explicit_trigger)
docs: Parse a named event or explicit stream trigger into a TriggerDefinition.