code: def create_logger(cfg, cfg_name):
      root_output_dir = Path(cfg.OUTPUT_DIR)
      if not root_output_dir.exists():
          print(f"=> creating {root_output_dir}")
      cfg_name = osp.basename(cfg_name).split(".")[0]
      final_output_dir = root_output_dir / cfg_name
      print(f"=> creating {final_output_dir}")
      final_output_dir.mkdir(parents=True, exist_ok=True)
  
      time_str = time.strftime("%Y-%m-%d-%H-%M")
      log_file = "{}_{}.log".format(cfg_name, time_str)
      final_log_file = final_output_dir / log_file
      head = "%(asctime)-15s %(message)s"
      logging.basicConfig(filename=str(final_log_file), format=head)
      logger = logging.getLogger()
      logger.setLevel(logging.INFO)
      console = logging.StreamHandler()
      logging.getLogger("").addHandler(console)
  
      tensorboard_log_dir = Path(cfg.LOG_DIR) / (
          cfg_name + "_" + time_str
      )
      print(f"=> creating {tensorboard_log_dir}")
      tensorboard_log_dir.mkdir(parents=True, exist_ok=True)
      return logger, str(final_output_dir), str(tensorboard_log_dir)
  
file_path: insightface/body/human_pose/ambiguity_aware/lib/utils/misc.py
imports: import os
  import os.path
  import h5py
  import math
  import time
  import logging
  import pickle
  import torch.nn
  from pathlib import Path
label_desc: Use image node_id 1 for calling a global function with example usage: create_logger(cfg, cfg_name) and returns: logger,  str,  str