def METHOD_NAME(run_command):
    @click.command()
    @click.option("--bar", type=TaskPath(require_absolute=True))
    def foo(bar):
        click.echo(repr(bar))
    # absolute paths are fine
    result = run_command(foo, ["--bar", "/baz.txt"])
    assert (
        "TaskPath(base_dir=None,coerce_to_dir=False,normalize=True,"
        "path=/baz.txt,orig_path=/baz.txt)\n"
    ) == result.output
    result = run_command(foo, ["--bar", "/baz/"])
    assert (
        "TaskPath(base_dir=None,coerce_to_dir=False,normalize=True,"
        "path=/baz/,orig_path=/baz/)\n"
    ) == result.output
    # non-absolute paths error
    result = run_command(foo, ["--bar", "baz.txt"], exit_code=2)
    assert "baz.txt is not absolute" in result.output
    result = run_command(foo, ["--bar", "baz/"], exit_code=2)
    assert "baz/ is not absolute" in result.output