code: def add_model(self, spec):
          
  
          if isinstance(spec, _model.MLModel):
              spec = spec._spec
  
          pipeline = self.spec.pipeline
          step_spec = pipeline.models.add()
          step_spec.CopyFrom(spec)
docs: Add a protobuf spec or :py:class:`models.MLModel` instance to the pipeline.
  
          All input features of this model must either match the input_features
          of the pipeline, or match the outputs of a previous model.
  
          Parameters
          ----------
          spec: [MLModel, Model_pb2]
              A protobuf spec or MLModel instance containing a model.