def METHOD_NAME(grant_target_name, user_name, node=None):
    """Run scenarios to check the user's access with different privileges.
    """
    exitcode, message = errors.not_enough_privileges(name=f"{user_name}")
    with Scenario("user without privilege"):
        with When("I grant the user NONE privilege"):
            node.query(f"GRANT NONE TO {grant_target_name}")
        with And("I grant the user USAGE privilege"):
            node.query(f"GRANT USAGE ON *.* TO {grant_target_name}")
        with Then("I attempt to kill a query without privilege"):
            node.query(f"KILL QUERY WHERE user ='default'", settings = [("user", user_name)],
                exitcode=exitcode, message=message)
    with Scenario("user with privilege"):
        with When("I grant kill query privilege"):
            node.query(f"GRANT KILL QUERY TO {grant_target_name}")
        with Then("I attempt to kill a query"):
            node.query(f"KILL QUERY WHERE 1", settings = [("user", user_name)])
    with Scenario("user with revoked privilege"):
        with When("I grant the kill query privilege"):
            node.query(f"GRANT KILL QUERY TO {grant_target_name}")
        with And("I revoke the kill query privilege"):
            node.query(f"REVOKE KILL QUERY TO {grant_target_name}")
        with Then("I attempt to kill a query"):
            node.query(f"KILL QUERY WHERE 1", settings = [("user", user_name)],
                exitcode=exitcode, message=message)
    with Scenario("user with revoked ALL privilege"):
        with When("I grant the kill query privilege"):
            node.query(f"GRANT KILL QUERY TO {grant_target_name}")
        with And("I revoke ALL privilege"):
            node.query(f"REVOKE ALL ON *.* FROM {grant_target_name}")
        with Then("I attempt to kill a query"):
            node.query(f"KILL QUERY WHERE 1", settings = [("user", user_name)],
                exitcode=exitcode, message=message)
    with Scenario("execute on cluster"):
        with When("I grant the truncate privilege"):
            node.query(f"GRANT KILL QUERY TO {grant_target_name}")
        with Then("I attempt to kill a query"):
            node.query(f"KILL QUERY ON CLUSTER WHERE 1'", settings = [("user", user_name)])
    with Scenario("user with ALL privilege"):
        with When("I revoke ALL privilege"):
            node.query(f"REVOKE ALL ON *.* FROM {grant_target_name}")
        with And("I grant ALL privilege"):
            node.query(f"GRANT ALL ON *.* ON {grant_target_name}")
        with Then("I attempt to kill a query"):
            node.query(f"KILL QUERY WHERE 1", settings = [("user", user_name)])