code: def test_add_code_to_system_path(sklearn_knn_model, model_path):
      mlflow.sklearn.save_model(
          sk_model=sklearn_knn_model,
          path=model_path,
          code_paths=[
              "tests/utils/test_resources/dummy_module.py",
              "tests/utils/test_resources/dummy_package",
          ],
      )
  
      sklearn_flavor_config = (
          mlflow_model_utils._get_flavor_configuration(
              model_path=model_path,
              flavor_name=mlflow.sklearn.FLAVOR_NAME,
          )
      )
      with TempDir(chdr=True):
          # Load the model from a new directory that is not a parent of the source code path to
          # verify that source code paths and their subdirectories are resolved correctly
          with pytest.raises(
              ModuleNotFoundError,
              match="No module named 'dummy_module'",
          ):
              import dummy_module
  
          mlflow_model_utils._add_code_from_conf_to_system_path(
              model_path, sklearn_flavor_config
          )
          import dummy_module  # noqa: F401
  
      # If this raises an exception it's because dummy_package.test imported
      # dummy_package.operator and not the built-in operator module. This only
      # happens if MLflow is misconfiguring the system path.
      from dummy_package import base  # noqa: F401
  
      # Ensure that the custom tests/utils/test_resources/dummy_package/pandas.py is not
      # overwriting the 3rd party `pandas` package
      assert "dummy_package" in sys.modules
      assert "pandas" in sys.modules
      assert "site-packages" in sys.modules["pandas"].__file__
  
file_path: mlflow/tests/utils/test_model_utils.py
imports: import os
  import sys
  import pytest
  import sklearn.neighbors
  from sklearn import datasets
  import mlflow.sklearn
  import mlflow.utils.model_utils
  from mlflow.exceptions import MlflowException
  from mlflow.mleap import FLAVOR_NAME
  from mlflow.models import Model
  from mlflow.protos.databricks_pb2 import RESOURCE_DOES_NOT_EXIST, ErrorCode
  from mlflow.utils.file_utils import TempDir
label_desc: Use image node_id 6 for calling a global function with example usage: test_add_code_to_system_path(sklearn_knn_model, model_path) without return types