code: def createLogger(name, level=logging.WARNING):
      
      logger = logging.getLogger(name)
      logger.setLevel(level)
      handler = logging.StreamHandler()
      handler.setFormatter(logging.Formatter('%(asctime)s [%(levelname)s] %(name)s: %(message)s'))
      logger.addHandler(handler)
      logger.propagate = False
      return logger
docs: :Return: a logger with the given `name` and optional `level`.