code: def test_nest_trials(tmpdir: py.path.local) -> None:
      tracking_uri = f"file:{tmpdir}"
      study_name = "my_study"
      mlflow.set_tracking_uri(tracking_uri)
      mlflow.set_experiment(study_name)
  
      mlflc = MLflowCallback(
          tracking_uri=tracking_uri, mlflow_kwargs={"nested": True}
      )
      study = optuna.create_study(study_name=study_name)
  
      n_trials = 3
      with mlflow.start_run() as parent_run:
          study.optimize(
              _objective_func, n_trials=n_trials, callbacks=[mlflc]
          )
  
      mlfl_client = MlflowClient(tracking_uri)
      experiments = mlfl_client.search_experiments()
      experiment_id = experiments[0].experiment_id
  
      all_runs = mlfl_client.search_runs([experiment_id])
      child_runs = [
          r for r in all_runs if MLFLOW_PARENT_RUN_ID in r.data.tags
      ]
  
      assert len(all_runs) == n_trials + 1
      assert len(child_runs) == n_trials
      assert all(
          r.data.tags[MLFLOW_PARENT_RUN_ID] == parent_run.info.run_id
          for r in child_runs
      )
      assert all(
          set(r.data.params.keys()) == {"x", "y", "z"}
          for r in child_runs
      )
      assert all(
          set(r.data.metrics.keys()) == {"value"} for r in child_runs
      )
  
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 11 for calling a global function with example usage: test_nest_trials(tmpdir) without return types