code: def close_log(log, verbose=True):
      
  
      if verbose:
          print('Closing log file:', log.name)
  
      # Send closing message.
      log.info('The log file has been closed.')
  
      # Remove all handlers from log.
      [log.removeHandler(handler) for handler in log.handlers]
docs: Close log
  
      This method closes and active logging.Logger instance.
  
      Parameters
      ----------
      log : logging.Logger
          Logging instance