code: def log(logger, level, message):
      
  
      if logger.parent.name != 'root':
          logger.log(level, message)
      else:
          print(message, file=sys.stderr)
docs: Logs message to stderr if logging isn't initialized.