def METHOD_NAME(node, is_detail):
    """
    Check if a Python AST node is a @action(detail=<is_detail>) decorator.
    If is_detail is None, then return all of the action decorators.
    """
    if not isinstance(node, ast.Call):
        return False
    if not hasattr(node.func, "id"):
        return False
    if not node.func.id == "action":
        return False
    if is_detail is not None:
        has_detail = any(
            keyword.arg == "detail" and keyword.value.value for keyword in node.keywords
        )
        if not has_detail == is_detail:
            return False
    return True