code: def test_construct_logger_terminal(caplog):
      """Test that logger outputs to terminal when log_to_terminal is True."""
      logger_name = "test_logger"
      save_dir = "./tests/outputs"
      os.makedirs(save_dir, exist_ok=True)
  
      t_logger = logger.construct_logger(
          logger_name, save_dir, log_to_terminal=True
      )
      t_logger.debug("This is a debug message")
      t_logger.info("This is an info message")
  
      # Assert that messages were logged to the terminal
      assert "This is a debug message" in caplog.text
      assert "This is an info message" in caplog.text
  
file_path: pykale/tests/utils/test_logger.py
imports: import logging
  import os
  import pytest
  from kale.utils import logger
label_desc: Use image node_id 2 for calling a global function with example usage: test_construct_logger_terminal(caplog) without return types