code: def set_logger(args):
      """
      Write logs to console and log file
      """
      log_file = os.path.join(args.save_path, "train.log")
      logging.basicConfig(
          format="%(asctime)s %(levelname)-8s %(message)s",
          level=logging.INFO,
          datefmt="%Y-%m-%d %H:%M:%S",
          filename=log_file,
          filemode="a+",
      )
      if args.print_on_screen:
          console = logging.StreamHandler()
          console.setLevel(logging.INFO)
          formatter = logging.Formatter(
              "%(asctime)s %(levelname)-8s %(message)s"
          )
          console.setFormatter(formatter)
          logging.getLogger("").addHandler(console)
  
file_path: ogb/examples/lsc/wikikg90m/dgl-ke-ogb-lsc/python/dglke/train.py
imports: import os
  import logging
  import time
  from .dataloader import EvalDataset, TrainDataset, NewBidirectionalOneShotIterator
  from .dataloader import get_dataset
  from .utils import get_compatible_batch_size, save_model, CommonArgParser
  import torch
  import numpy
  import torch.multiprocessing
  from .train_pytorch import load_model
  from .train_pytorch import train, train_mp
  from .train_pytorch import test, test_mp
  from ogb.lsc import WikiKG90MDataset, WikiKG90MEvaluator
label_desc: Use image node_id 3 for calling a global function with example usage: set_logger(args) without return types