code: def test_log_completed_trial(
      capsys: _pytest.capture.CaptureFixture,
  ) -> None:
      # We need to reconstruct our default handler to properly capture stderr.
      optuna.logging._reset_library_root_logger()
      optuna.logging.set_verbosity(optuna.logging.INFO)
  
      study = optuna.multi_objective.create_study(
          ["minimize", "maximize"]
      )
      study.optimize(lambda t: (1.0, 1.0), n_trials=1)
      _, err = capsys.readouterr()
      assert "Trial 0" in err
  
      optuna.logging.set_verbosity(optuna.logging.WARNING)
      study.optimize(lambda t: (1.0, 1.0), n_trials=1)
      _, err = capsys.readouterr()
      assert "Trial 1" not in err
  
      optuna.logging.set_verbosity(optuna.logging.DEBUG)
      study.optimize(lambda t: (1.0, 1.0), n_trials=1)
      _, err = capsys.readouterr()
      assert "Trial 2" in err
  
file_path: optuna/tests/multi_objective_tests/test_study.py
imports: from typing import List
  from typing import Tuple
  import uuid
  import _pytest.capture
  import pytest
  import optuna
  from optuna.study._study_direction import StudyDirection
  from optuna.testing.storages import StorageSupplier
label_desc: Use image node_id 8 for calling a global function with example usage: test_log_completed_trial(capsys) without return types