import ast
from typing import Set


def all_statements(tree: ast.AST) -> Set[ast.stmt]:
    """
    Return the set of all ast.stmt nodes in a tree.
    """
    return {node for node in ast.walk(tree) if isinstance(node, ast.stmt)}