code: def add_output(self, out_name, type_or_serialize=None, **kwargs):
          
          if out_name not in self.engine.all_outputs():
              raise ValueError("'%s' is not generated by the engine %s" % (out_name, self.engine.all_outputs()))
          if type_or_serialize is None:
              type_or_serialize = GenericType()
          if not isinstance(type_or_serialize, GenericType) and callable(type_or_serialize):
              type_or_serialize = GenericType(serialize=type_or_serialize)
          elif not isinstance(type_or_serialize, GenericType):
              raise ValueError("the given 'type_or_serialize' is invalid")
          # register outpurs
          self._outputs[out_name] = {
              'serializer': type_or_serialize,
              'parameters': kwargs if kwargs else {}
          }
docs: Declare an output