code: def loop(self, events=[]):
          '''
          Run the loop.
          '''
          try:
              for e in events:
                  if e.type == METAEVENT:
                      e = self.MetaEvent(e)
                  for func in self.event_funcs.get(e.type, []):
                      func(self, self.gstate, e)
          except self.Message as e:
              return e.messagf loop(self, events=[]):
          '''
          Run the loop.
          '''
          try:
              for e in events:
                  if e.type == METAEVENT:
                      e = self.MetaEvent(e)
                  for func in self.event_funcs.get(e.type, []):
                      func(self, self.gstate, e)
          except self.Message as e:
              return e.message
docs: Run the loop.