docs: def set_loglevel(level: Union[int, str, None] = None) -> None:
      """Set proper log-level.
  
      :arg Optional[int, str] level: Level to be set. If None, use proper log
      level from command line option. Default value is ``logging.INFO``.
      """
      if level is not None:
          lv = level_to_int(level)
      elif config.logging:
          lv = level_to_int(config.logging)
      elif config.debug:
          lv = logging.DEBUG
      else:
          lv = logging.INFO
      root_logger.setLevel(lv)
      _log_handler.setLevel(lv)