code: def test_mlflow_callback_fails_when_nest_trials_is_false_and_active_run_exists(
      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)
      study = optuna.create_study(study_name=study_name)
  
      with mlflow.start_run():
          with pytest.raises(
              Exception, match=r"Run with UUID \w+ is already active."
          ):
              study.optimize(
                  _objective_func, n_trials=1, callbacks=[mlflc]
              )
  
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 13 for calling a global function with example usage: test_mlflow_callback_fails_when_nest_trials_is_false_and_active_run_exists(tmpdir) without return types