docs: def get_config_parameter_loglevel(config: ConfigParser,
                                    section: str,
                                    param: str,
                                    default: int) -> int:
      """
      Get ``loglevel`` parameter from ``configparser`` ``.INI`` file, e.g.
      mapping ``'debug'`` to ``logging.DEBUG``.
  
      Args:
          config: :class:`ConfigParser` object
          section: section name within config file
          param: name of parameter within section
          default: default value
      Returns:
          parameter value, or default
      """
      try:
          value = config.get(section, param).lower()
          if value == "debug":
              return logging.DEBUG  # 10
          elif value == "info":
              return logging.INFO
          elif value in ["warn", "warning"]:
              return logging.WARN
          elif value == "error":
              return logging.ERROR
          elif value in ["critical", "fatal"]:
              return logging.CRITICAL  # 50
          else:
              raise ValueError
      except (TypeError, ValueError, NoOptionError, AttributeError):
          log.warning(
              "Configuration variable {} not found or improper in section [{}]; "
              "using default of {!r}", param, section, default)
          return default