code: def prepare_logger(logger, debug=False, save_to_file=None):
      """doc"""
      formatter = logging.Formatter(
          fmt="[%(levelname)s] %(asctime)s [%(filename)12s:%(lineno)5d]:\t%(message)s"
      )
      # console_hdl = logging.StreamHandler()
      # console_hdl.setFormatter(formatter)
      # logger.addHandler(console_hdl)
      if save_to_file is not None and not os.path.exists(save_to_file):
          file_hdl = logging.FileHandler(save_to_file)
          file_hdl.setFormatter(formatter)
          logger.addHandler(file_hdl)
      logger.setLevel(logging.DEBUG)
      logger.propagate = False
  
file_path: PGL/ogb_examples/linkproppred/ogbl-ppa/utils/args.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from __future__ import absolute_import
  import six
  import os
  import sys
  import argparse
  import logging
  import paddle.fluid
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_logger(logger, debug, save_to_file) without return types