docs: def config_flag(option, value, default=False, section=cli.name):
      """Guesses whether a CLI flag should be turned on or off from the
      configuration.  If the configuration option value is same with the given
      value, it returns ``True``.
  
      ::
  
         @click.option('--ko-kr', 'locale', is_flag=True,
                       default=config_flag('locale', 'ko_KR'))
  
      """
      class x(object):
          def __bool__(self, option=option, value=value,
                       default=default, section=section):
              config = read_config()
              type = builtins.type(value)
              get_option = option_getter(type)
              try:
                  return get_option(config, section, option) == value
              except (NoOptionError, NoSectionError):
                  return default
          __nonzero__ = __bool__
      return x()