code: def test_tag_study_user_attrs(
      tmpdir: py.path.local, tag_study_user_attrs: bool
  ) -> None:
      tracking_uri = f"file:{tmpdir}"
      study_name = "my_study"
      n_trials = 3
  
      mlflc = MLflowCallback(
          tracking_uri=tracking_uri,
          tag_study_user_attrs=tag_study_user_attrs,
      )
      study = optuna.create_study(study_name=study_name)
      study.set_user_attr("my_study_attr", "a")
      study.optimize(
          _objective_func_long_user_attr,
          n_trials=n_trials,
          callbacks=[mlflc],
      )
  
      mlfl_client = MlflowClient(tracking_uri)
      experiments = mlfl_client.search_experiments()
      assert len(experiments) == 1
  
      experiment = experiments[0]
      assert experiment.name == study_name
      experiment_id = experiment.experiment_id
  
      runs = mlfl_client.search_runs([experiment_id])
      assert len(runs) == n_trials
  
      if tag_study_user_attrs:
          assert all(
              (r.data.tags["my_study_attr"] == "a") for r in runs
          )
      else:
          assert all(("my_study_attr" not in r.data.tags) for r in 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 15 for calling a global function with example usage: test_tag_study_user_attrs(tmpdir, tag_study_user_attrs) without return types