code: def get_logger(
      logpath,
      filepath,
      package_files=[],
      displaying=True,
      saving=True,
      debug=False,
  ):
      logger = logging.getLogger()
      if debug:
          level = logging.DEBUG
      else:
          level = logging.INFO
      logger.setLevel(level)
      if saving:
          info_file_handler = logging.FileHandler(logpath, mode="a")
          info_file_handler.setLevel(level)
          logger.addHandler(info_file_handler)
      if displaying:
          console_handler = logging.StreamHandler()
          console_handler.setLevel(level)
          logger.addHandler(console_handler)
      logger.info(filepath)
      with open(filepath, "r") as f:
          logger.info(f.read())
  
      for f in package_files:
          logger.info(f)
          with open(f, "r") as package_f:
              logger.info(package_f.read())
  
      return logger
  
imports: import os
  import argparse
  import logging
  import time
  import numpy
  import torch
  import torch.nn
  from torch.utils.data import DataLoader
  import torchvision.datasets
  import torchvision.transforms
label_desc: Use image node_id 11 for calling a global function with example usage: get_logger(logpath, filepath, package_files, displaying, saving, debug) and returns: logger