code: def _log_mlflow(
      log_metrics,
      steps,
      save_path,
      should_continue,
      log_artifacts: bool = True,
  ):
      """The save_fn for the MlflowCallback.
  
      This is used when save_in_background is False.
      """
      if log_metrics is not None:
          if (
              "llm_eval_examples" in log_metrics
              and log_metrics["llm_eval_examples"] is not None
          ):
              # mlflow.log_dict(log_metrics["llm_eval_examples"], artifact_file="llm_eval_examples.json")
              # Delete the table from the metrics dict so we don't try to log it with the other metrics
              del log_metrics["llm_eval_examples"]
          mlflow.log_metrics(log_metrics, step=steps)
          if log_artifacts:
              _log_model(save_path)
  
imports: import logging
  import os
  import queue
  import threading
  from ludwig.api_annotations import DeveloperAPI, PublicAPI
  from ludwig.callbacks import Callback
  from ludwig.constants import TRAINER
  from ludwig.globals import MODEL_HYPERPARAMETERS_FILE_NAME, TRAIN_SET_METADATA_FILE_NAME
  from ludwig.types import TrainingSetMetadataDict
  from ludwig.utils.data_utils import chunk_dict, flatten_dict, save_json, to_json_dict
  from ludwig.utils.package_utils import LazyLoader
label_desc: Use image node_id 4 for calling a global function with example usage: _log_mlflow(log_metrics, steps, save_path, should_continue, log_artifacts) without return types