code: def process(self, stage):
          
          self.logger.info("Processing pipeline stage '%s'", self.title)
          output = []
          for entry in stage:
              key = list(entry.keys())[0]
              if key == "env":
                  self.pipeline.data.env_list[1].update(entry[key])
                  self.logger.debug("Updating environment at level 1 with %s",
                                    self.pipeline.data.env_list[1])
                  continue
  
              # if not "env" then it must be "tasks" (schema):
              tasks = Tasks(self.pipeline, re.match(r"tasks\(parallel\)", key) is not None)
              result = tasks.process(entry[key])
              for line in result['output']:
                  output.append(line)
              if not result['success']:
                  self.event.failed()
                  return {'success': False, 'output': output}
  
          self.event.succeeded()
          return {'success': True, 'output': output}
docs: Processing one stage.