code: def test_log_metric_none(tmpdir: py.path.local) -> None:
      tracking_uri = f"file:{tmpdir}"
      metric_name = "metric"
      study_name = "my_study"
  
      mlflc = MLflowCallback(
          tracking_uri=tracking_uri, metric_name=metric_name
      )
      study = optuna.create_study(study_name=study_name)
      study.optimize(lambda _: np.nan, 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()
  
      # When `values` is `None`, do not save values with metric names.
      assert metric_name not in run_dict["data"]["metrics"]
  
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 20 for calling a global function with example usage: test_log_metric_none(tmpdir) without return types