code: def test_get_logger(
      caplog: _pytest.logging.LogCaptureFixture,
  ) -> None:
      # Log propagation is necessary for caplog to capture log outputs.
      optuna.logging.enable_propagation()
  
      logger = optuna.logging.get_logger("optuna.foo")
      with caplog.at_level(logging.INFO, logger="optuna.foo"):
          logger.info("hello")
      assert "hello" in caplog.text
  
file_path: optuna/tests/test_logging.py
imports: import logging
  import _pytest.capture
  import _pytest.logging
  import optuna.logging
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_logger(caplog) without return types