code: def init_logger(logger):
      logger.setLevel(level)
  
      if file_log is not None:
          fileHandler = logging.FileHandler(file_log)
          init_handler(fileHandler)
          logger.addHandler(fileHandler)
  
      if console_log:
          consoleHandler = logging.StreamHandler()
          init_handler(consoleHandler)
          logger.addHandler(consoleHandler)
  
file_path: pyalgotrade/pyalgotrade/logger.py
imports: import logging
  import threading
label_desc: Use image node_id 2 for calling a global function with example usage: init_logger(logger) without return types