import click


def user_callback(_ctx, param, value):
    """
    A fake user callback ued for testing.

    :param _ctx: The click context
    :param param: The parameter name
    :param value: The parameter value
    :return: The validated parameter
    """
    if not value:
        return -1

    if value != 42:
        raise click.BadParameter('invalid', param=param)

    return value