code: def set_logger(logger, rank, models_root):
      formatter = logging.Formatter(
          "rank-id:" + str(rank) + ":%(asctime)s-%(message)s"
      )
      file_handler = logging.FileHandler(
          os.path.join(models_root, "%d_hist.log" % rank)
      )
      stream_handler = logging.StreamHandler(sys.stdout)
      file_handler.setFormatter(formatter)
      stream_handler.setFormatter(formatter)
      logger.addHandler(file_handler)
      logger.addHandler(stream_handler)
      logger.info("rank_id: %d" % rank)
  
imports: import argparse
  import logging
  import os
  import sys
  import time
  import horovod.mxnet
  import mxnet
  import default
  from callbacks import CallBackModelSave, CallBackLogging, CallBackCenterSave, CallBackVertification
  from default import config
  from image_iter import FaceImageIter, DummyIter
  from memory_module import SampleDistributeModule
  from memory_bank import MemoryBank
  from memory_scheduler import get_scheduler
  from memory_softmax import MarginLoss
  from optimizer import MemoryBankSGDOptimizer
  from symbol import resnet
label_desc: Use image node_id 2 for calling a global function with example usage: set_logger(logger, rank, models_root) without return types