code: def test_log_model(
      auto_arima_model, tmp_path, should_start_run, serialization_format
  ):
      """Test logging and reloading sktime model."""
      import mlflow
      from mlflow import pyfunc
      from mlflow.models import Model
      from mlflow.tracking.artifact_utils import (
          _download_artifact_from_uri,
      )
      from mlflow.utils.environment import _mlflow_conda_env
  
      from sktime.utils import mlflow_sktime
  
      try:
          if should_start_run:
              mlflow.start_run()
          artifact_path = "sktime"
          conda_env = tmp_path.joinpath("conda_env.yaml")
          _mlflow_conda_env(conda_env, additional_pip_deps=["sktime"])
          model_info = mlflow_sktime.log_model(
              sktime_model=auto_arima_model,
              artifact_path=artifact_path,
              conda_env=str(conda_env),
              serialization_format=serialization_format,
          )
          model_uri = (
              f"runs:/{mlflow.active_run().info.run_id}/{artifact_path}"
          )
          assert model_info.model_uri == model_uri
          reloaded_model = mlflow_sktime.load_model(
              model_uri=model_uri,
          )
          np.testing.assert_array_equal(
              auto_arima_model.predict(), reloaded_model.predict()
          )
          model_path = Path(
              _download_artifact_from_uri(artifact_uri=model_uri)
          )
          model_config = Model.load(str(model_path.joinpath("MLmodel")))
          assert pyfunc.FLAVOR_NAME in model_config.flavors
      finally:
          mlflow.end_run()
  
imports: import os
  import sys
  from pathlib import Path
  from unittest import mock
  import numpy
  import pandas
  import pytest
  from sktime.datasets import load_airline, load_arrow_head, load_longley
  from sktime.forecasting.arima import AutoARIMA
  from sktime.forecasting.naive import NaiveForecaster
  from sktime.split import temporal_train_test_split
  from sktime.utils.multiindex import flatten_multiindex
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 21 for calling a global function with example usage: test_log_model(auto_arima_model, tmp_path, should_start_run, serialization_format) without return types