code: def test_mlflow_bad_metric_name_handling(dirname):
      import mlflow
  
      true_values = [123.0, 23.4, 333.4]
      with MLflowLogger(str(dirname / "mlruns")) as mlflow_logger:
          active_run = mlflow.active_run()
  
          handler = OutputHandler(tag="training", metric_names="all")
          engine = Engine(lambda e, b: None)
          engine.state = State(
              metrics={"metric:0 in %": 123.0, "metric 0": 1000.0}
          )
  
          with pytest.warns(
              UserWarning,
              match=r"MLflowLogger output_handler encountered an invalid metric name",
          ):
              engine.state.epoch = 1
              handler(
                  engine,
                  mlflow_logger,
                  event_name=Events.EPOCH_COMPLETED,
              )
  
              for _, v in enumerate(true_values):
                  engine.state.epoch += 1
                  engine.state.metrics["metric 0"] = v
                  handler(
                      engine,
                      mlflow_logger,
                      event_name=Events.EPOCH_COMPLETED,
                  )
  
      from mlflow.tracking import MlflowClient
  
      client = MlflowClient(tracking_uri=str(dirname / "mlruns"))
      stored_values = client.get_metric_history(
          active_run.info.run_id, "training metric 0"
      )
  
      for t, s in zip([1000.0] + true_values, stored_values):
          assert t == s.value
  
file_path: ignite/tests/ignite/contrib/handlers/test_mlflow_logger.py
imports: import sys
  from unittest.mock import call, MagicMock
  import pytest
  import torch
  from ignite.contrib.handlers.mlflow_logger import global_step_from_engine, MLflowLogger, OptimizerParamsHandler, OutputHandler
  from ignite.engine import Engine, Events, State
label_desc: Use image node_id 13 for calling a global function with example usage: test_mlflow_bad_metric_name_handling(dirname) without return types