def METHOD_NAME(f: F) -> F:
    def callback(ctx, param, value):
        if not value or ctx.resilient_parsing:
            # turn off warnings altogether
            warnings.simplefilter("ignore")
            return
        warnings.simplefilter("default")
        state = ctx.ensure_object(CommandState)
        state.debug = True
        _setup_logging(level="DEBUG")
    return click.option(
        "--debug",
        is_flag=True,
        hidden=True,
        expose_value=False,
        callback=callback,
        is_eager=True,
    )(f)