import ast
import textwrap


def parse_ast_stmt(stmt_code: str) -> ast.stmt:
    """Parses code for a single statement into an AST."""
    stmt_code = textwrap.dedent(stmt_code)
    node = ast.parse(stmt_code, mode="exec")
    assert isinstance(node, ast.Module)
    if len(node.body) > 1:
        raise ValueError(f"Code contains more than one statement: {stmt_code}")
    return node.body[0]