code: def test_model_log_load(sklearn_knn_model, iris_data, tmp_path):
      sk_model_path = os.path.join(tmp_path, "knn.pkl")
      with open(sk_model_path, "wb") as f:
          pickle.dump(sklearn_knn_model, f)
  
      pyfunc_artifact_path = "pyfunc_model"
      with mlflow.start_run():
          mlflow.pyfunc.log_model(
              artifact_path=pyfunc_artifact_path,
              data_path=sk_model_path,
              loader_module=__name__,
              code_path=[__file__],
          )
          pyfunc_model_path = _download_artifact_from_uri(
              f"runs:/{mlflow.active_run().info.run_id}/{pyfunc_artifact_path}"
          )
  
      model_config = Model.load(
          os.path.join(pyfunc_model_path, "MLmodel")
      )
      assert mlflow.pyfunc.FLAVOR_NAME in model_config.flavors
      assert (
          mlflow.pyfunc.PY_VERSION
          in model_config.flavors[mlflow.pyfunc.FLAVOR_NAME]
      )
      reloaded_model = mlflow.pyfunc.load_model(pyfunc_model_path)
      assert model_config.to_yaml() == reloaded_model.metadata.to_yaml()
      np.testing.assert_array_equal(
          sklearn_knn_model.predict(iris_data[0]),
          reloaded_model.predict(iris_data[0]),
      )
  
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 9 for calling a global function with example usage: test_model_log_load(sklearn_knn_model, iris_data, tmp_path) without return types