code: def test_tag_truncation(tmpdir: py.path.local) -> None:
      tracking_uri = f"file:{tmpdir}"
      study_name = "my_study"
      n_trials = 3
  
      mlflc = MLflowCallback(tracking_uri=tracking_uri)
      study = optuna.create_study(study_name=study_name)
      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
  
      first_run = runs[0]
      first_run_dict = first_run.to_dictionary()
  
      my_user_attr = first_run_dict["data"]["tags"]["my_user_attr"]
      assert len(my_user_attr) <= 5000
  
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 10 for calling a global function with example usage: test_tag_truncation(tmpdir) without return types