code: def test_johnsnowlabs_model_log(
      tmp_path, jsl_model, should_start_run, use_dfs_tmpdir
  ):
      old_tracking_uri = mlflow.get_tracking_uri()
      dfs_tmpdir = None if use_dfs_tmpdir else tmp_path.joinpath("test")
  
      try:
          tracking_dir = tmp_path.joinpath("mlruns")
          mlflow.set_tracking_uri(f"file://{tracking_dir}")
          if should_start_run:
              mlflow.start_run()
          artifact_path = "model"
          mlflow.johnsnowlabs.log_model(
              artifact_path=artifact_path,
              spark_model=jsl_model,
              dfs_tmpdir=dfs_tmpdir,
          )
          model_uri = (
              f"runs:/{mlflow.active_run().info.run_id}/{artifact_path}"
          )
  
          reloaded_model = mlflow.johnsnowlabs.load_model(
              model_uri=model_uri, dfs_tmpdir=dfs_tmpdir
          )
          validate_model(jsl_model, reloaded_model)
      finally:
          mlflow.end_run()
          mlflow.set_tracking_uri(old_tracking_uri)
  
imports: import json
  import os
  from pathlib import Path
  from unittest import mock
  import pandas
  import pyspark
  import pytest
  from johnsnowlabs import nlp
  from packaging.version import Version
  import mlflow
  import mlflow.utils.file_utils
  from mlflow import pyfunc
  from mlflow.environment_variables import MLFLOW_DFS_TMP
  from mlflow.models import Model, infer_signature
  from mlflow.models.utils import _read_example
  from mlflow.pyfunc import spark_udf
  from mlflow.utils.environment import _mlflow_conda_env
  from mlflow.utils.file_utils import TempDir
  from tests.helper_functions import assert_register_model_called_with_local_model_path
label_desc: Use image node_id 12 for calling a global function with example usage: test_johnsnowlabs_model_log(tmp_path, jsl_model, should_start_run, use_dfs_tmpdir) without return types