docs: def enable_pretty_logging(logger='calmjs', level=logging.DEBUG, stream=None):
      """
      Shorthand to enable pretty logging
      """
  
      def cleanup():
          logger.removeHandler(handler)
          logger.level = old_level
  
      if not isinstance(logger, logging.Logger):
          logger = logging.getLogger(logger)
  
      old_level = logger.level
      handler = logging.StreamHandler(stream)
      handler.setFormatter(logging.Formatter(
          u'%(asctime)s %(levelname)s %(name)s %(message)s'))
      logger.addHandler(handler)
      logger.setLevel(level)
      return cleanup