code: def init_logger():
      configured_loggers = [log_config.get("root", {})] + [
          logger for logger in log_config.get("loggers", {}).values()
      ]
  
      used_handlers = {
          handler
          for log in configured_loggers
          for handler in log.get("handlers", [])
      }
  
      for handler_id, handler in list(log_config["handlers"].items()):
          if handler_id not in used_handlers:
              del log_config["handlers"][handler_id]
          elif "filename" in handler.keys():
              filename = handler["filename"]
              logfile_path = Path(filename).expanduser().resolve()
              handler["filename"] = str(logfile_path)
  
      logging.config.dictConfig(log_config)
  
file_path: DeepPavlov/deeppavlov/core/common/log.py
imports: import json
  import logging
  import logging.config
  from pathlib import Path
  from .paths import get_settings_path
label_desc: Use image node_id 1 for calling a global function with example usage: init_logger() without return types