code: def init_logging(rank, models_root):
      if rank == 0:
          log_root = logging.getLogger()
          log_root.setLevel(logging.INFO)
          formatter = logging.Formatter(
              "Training: %(asctime)s-%(message)s"
          )
          handler_file = logging.FileHandler(
              os.path.join(models_root, "training.log")
          )
          handler_stream = logging.StreamHandler(sys.stdout)
          handler_file.setFormatter(formatter)
          handler_stream.setFormatter(formatter)
          log_root.addHandler(handler_file)
          log_root.addHandler(handler_stream)
          log_root.info("rank_id: %d" % rank)
  
file_path: insightface/recognition/arcface_torch/utils/utils_logging.py
imports: import logging
  import os
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: init_logging(rank, models_root) without return types