code: def test_log_metric(
      tmpdir: py.path.local,
      func: Callable,
      names: List[str],
      values: List[float],
  ) -> None:
      tracking_uri = f"file:{tmpdir}"
      study_name = "my_study"
  
      mlflc = MLflowCallback(
          tracking_uri=tracking_uri, metric_name=names
      )
      study = optuna.create_study(
          study_name=study_name,
          directions=["minimize" for _ in range(len(values))],
      )
      study.enqueue_trial({"x": 1.0, "y": 20.0, "z": 1.0})
      study.optimize(func, n_trials=1, callbacks=[mlflc])
  
      mlfl_client = MlflowClient(tracking_uri)
      experiments = mlfl_client.search_experiments()
      experiment = experiments[0]
      experiment_id = experiment.experiment_id
  
      runs = mlfl_client.search_runs(experiment_id)
      assert len(runs) == 1
  
      run = runs[0]
      run_dict = run.to_dictionary()
  
      assert all(name in run_dict["data"]["metrics"] for name in names)
      assert all(
          [
              run_dict["data"]["metrics"][name] == val
              for name, val in zip(names, values)
          ]
      )
  
imports: from typing import Callable
  from typing import List
  from typing import Optional
  from typing import Tuple
  from typing import Union
  import numpy
  import py
  import pytest
  import optuna
  from optuna._imports import try_import
  from optuna.integration.mlflow import MLflowCallback
label_desc: Use image node_id 19 for calling a global function with example usage: test_log_metric(tmpdir, func, names, values) without return types