code: def test_log_model_persists_specified_conda_env_file_in_mlflow_model_directory(
      sklearn_knn_model, tmp_path, pyfunc_custom_env_file
  ):
      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__],
              conda_env=pyfunc_custom_env_file,
          )
          run_id = mlflow.active_run().info.run_id
  
      pyfunc_model_path = _download_artifact_from_uri(
          f"runs:/{run_id}/{pyfunc_artifact_path}"
      )
  
      pyfunc_conf = _get_flavor_configuration(
          model_path=pyfunc_model_path,
          flavor_name=mlflow.pyfunc.FLAVOR_NAME,
      )
      saved_conda_env_path = os.path.join(
          pyfunc_model_path, pyfunc_conf[mlflow.pyfunc.ENV]["conda"]
      )
      assert os.path.exists(saved_conda_env_path)
      assert saved_conda_env_path != pyfunc_custom_env_file
  
      with open(pyfunc_custom_env_file) as f:
          pyfunc_custom_env_parsed = yaml.safe_load(f)
      with open(saved_conda_env_path) as f:
          saved_conda_env_parsed = yaml.safe_load(f)
      assert saved_conda_env_parsed == pyfunc_custom_env_parsed
  
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 13 for calling a global function with example usage: test_log_model_persists_specified_conda_env_file_in_mlflow_model_directory(sklearn_knn_model, tmp_path, pyfunc_custom_env_file) without return types