def help_option(*param_decls, **attrs):
def decorator(f):<EOL><INDENT>def callback(ctx, param, value):<EOL><INDENT>if value and not ctx.resilient_parsing:<EOL><INDENT>echo(ctx.get_help(), color=ctx.color)<EOL>ctx.exit()<EOL><DEDENT><DEDENT>attrs.setdefault('<STR_LIT>', True)<EOL>attrs.setdefault('<STR_LIT>', False)<EOL>attrs.setdefault('<STR_LIT>', '<STR_LIT>')<EOL>attrs.setdefault('<STR_LIT>', True)<EOL>attrs['<STR_LIT>'] = callback<EOL>return option(*(param_decls or ('<STR_LIT>',)), **attrs)(f)<EOL><DEDENT>return decorator<EOL>
Adds a ``--help`` option which immediately ends the program
    printing out the help page.  This is usually unnecessary to add as
    this is added by default to all commands unless suppressed.

    Like :func:`version_option`, this is implemented as eager option that
    prints in the callback and exits.

    All arguments are forwarded to :func:`option`.