code: def test_simple(model1_backend, model2_backend):
      # Create models
      m1 = TestMakePipeline._make_model(
          "x", 20, "y1", 10, model1_backend
      )
      m2 = TestMakePipeline._make_model(
          "y1", 10, "y2", 2, model2_backend
      )
  
      # Get non-pipeline result
      x = np.random.rand(20)
      if _is_macos():
          y1 = m1.predict({"x": x})["y1"]
          y2 = m2.predict({"y1": y1})
  
      pipeline_model = ct.utils.make_pipeline(m1, m2)
  
      if _is_macos():
          y_pipeline = pipeline_model.predict({"x": x})
          assert len(y_pipeline) == 1
          np.testing.assert_allclose(y2["y2"], y_pipeline["y2"])
  
      # Check save/load
      with tempfile.TemporaryDirectory() as save_dir:
          # Save pipeline
          save_path = save_dir + "/test.mlpackage"
          pipeline_model.save(save_path)
  
          # Check loading from a mlpackage path
          p2 = ct.models.MLModel(save_path)
          if _is_macos():
              y_pipeline = p2.predict({"x": x})
              np.testing.assert_allclose(y2["y2"], y_pipeline["y2"])
  
          # Check loading from spec and weight dir
          p3 = ct.models.MLModel(
              p2.get_spec(), weights_dir=p2.weights_dir
          )
          if _is_macos():
              y_pipeline = p3.predict({"x": x})
              np.testing.assert_allclose(y2["y2"], y_pipeline["y2"])
  
imports: import itertools
  import tempfile
  import unittest
  import numpy
  import pytest
  import coremltools
  from coremltools._deps import _HAS_LIBSVM, _HAS_SKLEARN
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Function, Program
  from coremltools.models.pipeline import PipelineClassifier, PipelineRegressor
  from coremltools.models.utils import _is_macos
label_desc: Use image node_id 2 for calling the TestMakePipeline obj's underlying member method code with example usage: obj.test_simple(model1_backend, model2_backend) without return types