code: def test_signature_and_examples_are_saved_correctly(
      sklearn_knn_model, iris_data
  ):
      data = iris_data
      signature_ = infer_signature(*data)
      example_ = data[0][:3]
      for signature in (None, signature_):
          for example in (None, example_):
              with TempDir() as tmp:
                  with open(tmp.path("skmodel"), "wb") as f:
                      pickle.dump(sklearn_knn_model, f)
                  path = tmp.path("model")
                  mlflow.pyfunc.save_model(
                      path=path,
                      data_path=tmp.path("skmodel"),
                      loader_module=__name__,
                      code_path=[__file__],
                      signature=signature,
                      input_example=example,
                  )
                  mlflow_model = Model.load(path)
                  assert signature == mlflow_model.signature
                  if example is None:
                      assert (
                          mlflow_model.saved_input_example_info is None
                      )
                  else:
                      np.testing.assert_array_equal(
                          _read_example(mlflow_model, path), example
                      )
  
imports: import os
  import pickle
  import numpy
  import pytest
  import sklearn.datasets
  import sklearn.linear_model
  import sklearn.neighbors
  import yaml
  import mlflow
  import mlflow.pyfunc
  import mlflow.pyfunc.model
  import mlflow.sklearn
  from mlflow.exceptions import MlflowException
  from mlflow.models import Model, infer_signature
  from mlflow.models.utils import _read_example
  from mlflow.tracking.artifact_utils import _download_artifact_from_uri
  from mlflow.utils.environment import _mlflow_conda_env
  from mlflow.utils.file_utils import TempDir
  from mlflow.utils.model_utils import _get_flavor_configuration
  from tests.helper_functions import _assert_pip_requirements
label_desc: Use image node_id 8 for calling a global function with example usage: test_signature_and_examples_are_saved_correctly(sklearn_knn_model, iris_data) without return types