code: def test_cli_valid_logging_configuration() -> None:
      logging_config_file = (
          "data/test_logging_config_files/test_logging_config.yml"
      )
      configure_logging_from_file(
          logging_config_file=logging_config_file
      )
      rasa_logger = logging.getLogger("rasa")
  
      handlers = rasa_logger.handlers
      assert len(handlers) == 1
      assert isinstance(handlers[0], logging.FileHandler)
      assert "test_handler" == rasa_logger.handlers[0].name
  
      logging_message = "This is a test info log."
      rasa_logger.info(logging_message)
  
      handler_filename = handlers[0].baseFilename
      assert Path(handler_filename).exists()
  
      with open(handler_filename, "r") as logs:
          data = logs.readlines()
          logs_dict = json.loads(data[-1])
          assert logs_dict.get("message") == logging_message
  
          for key in ["time", "name", "levelname"]:
              assert key in logs_dict.keys()
  
imports: import json
  import os
  import logging
  import logging.config
  import sys
  from pathlib import Path
  from pytest import MonkeyPatch
  from typing import Any, Text, Type
  from unittest import mock
  import pytest
  from pytest import LogCaptureFixture
  from rasa.core.agent import Agent
  from rasa.nlu.classifiers.diet_classifier import DIETClassifier
  from rasa.shared.exceptions import RasaException
  import rasa.utils.common
  from rasa.utils.common import RepeatedLogFilter, find_unavailable_packages, configure_logging_and_warnings, configure_logging_from_file, get_bool_env_variable
  import tests.conftest
label_desc: Use image node_id 16 for calling a global function with example usage: test_cli_valid_logging_configuration() without return types