---
source: crates/ruff_python_parser/tests/fixtures.rs
input_file: crates/ruff_python_parser/resources/inline/err/invalid_annotation_function.py
---
## AST

```
Module(
    ModModule {
        node_index: AtomicNodeIndex(..),
        range: 0..987,
        body: [
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 0..28,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("d"),
                        range: 4..5,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 5..8,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 6..7,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 6..7,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 8..10,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: Some(
                        Await(
                            ExprAwait {
                                node_index: AtomicNodeIndex(..),
                                range: 15..22,
                                value: NumberLiteral(
                                    ExprNumberLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 21..22,
                                        value: Int(
                                            1,
                                        ),
                                    },
                                ),
                            },
                        ),
                    ),
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 25..28,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 25..28,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 29..58,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("e"),
                        range: 33..34,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 34..37,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 35..36,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 35..36,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 37..53,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [
                            ParameterWithDefault {
                                range: 38..52,
                                node_index: AtomicNodeIndex(..),
                                parameter: Parameter {
                                    range: 38..52,
                                    node_index: AtomicNodeIndex(..),
                                    name: Identifier {
                                        id: Name("arg"),
                                        range: 38..41,
                                        node_index: AtomicNodeIndex(..),
                                    },
                                    annotation: Some(
                                        Await(
                                            ExprAwait {
                                                node_index: AtomicNodeIndex(..),
                                                range: 44..51,
                                                value: NumberLiteral(
                                                    ExprNumberLiteral {
                                                        node_index: AtomicNodeIndex(..),
                                                        range: 50..51,
                                                        value: Int(
                                                            1,
                                                        ),
                                                    },
                                                ),
                                            },
                                        ),
                                    ),
                                },
                                default: None,
                            },
                        ],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 55..58,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 55..58,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 59..86,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("f"),
                        range: 63..64,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 64..67,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 65..66,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 65..66,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 67..69,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: Some(
                        Named(
                            ExprNamed {
                                node_index: AtomicNodeIndex(..),
                                range: 74..80,
                                target: Name(
                                    ExprName {
                                        node_index: AtomicNodeIndex(..),
                                        range: 74..75,
                                        id: Name("y"),
                                        ctx: Store,
                                    },
                                ),
                                value: NumberLiteral(
                                    ExprNumberLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 79..80,
                                        value: Int(
                                            3,
                                        ),
                                    },
                                ),
                            },
                        ),
                    ),
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 83..86,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 83..86,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 87..115,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("g"),
                        range: 91..92,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 92..95,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 93..94,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 93..94,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 95..110,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [
                            ParameterWithDefault {
                                range: 96..109,
                                node_index: AtomicNodeIndex(..),
                                parameter: Parameter {
                                    range: 96..109,
                                    node_index: AtomicNodeIndex(..),
                                    name: Identifier {
                                        id: Name("arg"),
                                        range: 96..99,
                                        node_index: AtomicNodeIndex(..),
                                    },
                                    annotation: Some(
                                        Named(
                                            ExprNamed {
                                                node_index: AtomicNodeIndex(..),
                                                range: 102..108,
                                                target: Name(
                                                    ExprName {
                                                        node_index: AtomicNodeIndex(..),
                                                        range: 102..103,
                                                        id: Name("x"),
                                                        ctx: Store,
                                                    },
                                                ),
                                                value: NumberLiteral(
                                                    ExprNumberLiteral {
                                                        node_index: AtomicNodeIndex(..),
                                                        range: 107..108,
                                                        value: Int(
                                                            1,
                                                        ),
                                                    },
                                                ),
                                            },
                                        ),
                                    ),
                                },
                                default: None,
                            },
                        ],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 112..115,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 112..115,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 116..143,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("h"),
                        range: 120..121,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 121..124,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 122..123,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 122..123,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 124..138,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [
                            ParameterWithDefault {
                                range: 125..137,
                                node_index: AtomicNodeIndex(..),
                                parameter: Parameter {
                                    range: 125..137,
                                    node_index: AtomicNodeIndex(..),
                                    name: Identifier {
                                        id: Name("x"),
                                        range: 125..126,
                                        node_index: AtomicNodeIndex(..),
                                    },
                                    annotation: Some(
                                        Yield(
                                            ExprYield {
                                                node_index: AtomicNodeIndex(..),
                                                range: 129..136,
                                                value: Some(
                                                    NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 135..136,
                                                            value: Int(
                                                                1,
                                                            ),
                                                        },
                                                    ),
                                                ),
                                            },
                                        ),
                                    ),
                                },
                                default: None,
                            },
                        ],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 140..143,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 140..143,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 144..172,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("j"),
                        range: 148..149,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 149..152,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 150..151,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 150..151,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 152..154,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: Some(
                        Yield(
                            ExprYield {
                                node_index: AtomicNodeIndex(..),
                                range: 159..166,
                                value: Some(
                                    NumberLiteral(
                                        ExprNumberLiteral {
                                            node_index: AtomicNodeIndex(..),
                                            range: 165..166,
                                            value: Int(
                                                1,
                                            ),
                                        },
                                    ),
                                ),
                            },
                        ),
                    ),
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 169..172,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 169..172,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 173..205,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("l"),
                        range: 177..178,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 178..181,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 179..180,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 179..180,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 181..200,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [
                            ParameterWithDefault {
                                range: 182..199,
                                node_index: AtomicNodeIndex(..),
                                parameter: Parameter {
                                    range: 182..199,
                                    node_index: AtomicNodeIndex(..),
                                    name: Identifier {
                                        id: Name("x"),
                                        range: 182..183,
                                        node_index: AtomicNodeIndex(..),
                                    },
                                    annotation: Some(
                                        YieldFrom(
                                            ExprYieldFrom {
                                                node_index: AtomicNodeIndex(..),
                                                range: 186..198,
                                                value: NumberLiteral(
                                                    ExprNumberLiteral {
                                                        node_index: AtomicNodeIndex(..),
                                                        range: 197..198,
                                                        value: Int(
                                                            1,
                                                        ),
                                                    },
                                                ),
                                            },
                                        ),
                                    ),
                                },
                                default: None,
                            },
                        ],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 202..205,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 202..205,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 206..239,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("n"),
                        range: 210..211,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 211..214,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 212..213,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 212..213,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 214..216,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: Some(
                        YieldFrom(
                            ExprYieldFrom {
                                node_index: AtomicNodeIndex(..),
                                range: 221..233,
                                value: NumberLiteral(
                                    ExprNumberLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 232..233,
                                        value: Int(
                                            1,
                                        ),
                                    },
                                ),
                            },
                        ),
                    ),
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 236..239,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 236..239,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 240..266,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("p"),
                        range: 244..245,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 245..259,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 246..258,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 246..247,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: Some(
                                            Yield(
                                                ExprYield {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 250..257,
                                                    value: Some(
                                                        NumberLiteral(
                                                            ExprNumberLiteral {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 256..257,
                                                                value: Int(
                                                                    1,
                                                                ),
                                                            },
                                                        ),
                                                    ),
                                                },
                                            ),
                                        ),
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 259..261,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 263..266,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 263..266,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 297..324,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("q"),
                        range: 301..302,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 302..317,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 303..316,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 303..304,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: Some(
                                            Yield(
                                                ExprYield {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 308..315,
                                                    value: Some(
                                                        NumberLiteral(
                                                            ExprNumberLiteral {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 314..315,
                                                                value: Int(
                                                                    1,
                                                                ),
                                                            },
                                                        ),
                                                    ),
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 317..319,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 321..324,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 321..324,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 356..385,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("r"),
                        range: 360..361,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 361..378,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVarTuple(
                                    TypeParamTypeVarTuple {
                                        range: 362..377,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("Ts"),
                                            range: 363..365,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        default: Some(
                                            Yield(
                                                ExprYield {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 369..376,
                                                    value: Some(
                                                        NumberLiteral(
                                                            ExprNumberLiteral {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 375..376,
                                                                value: Int(
                                                                    1,
                                                                ),
                                                            },
                                                        ),
                                                    ),
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 378..380,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 382..385,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 382..385,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 420..450,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("s"),
                        range: 424..425,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 425..443,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                ParamSpec(
                                    TypeParamParamSpec {
                                        range: 426..442,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("Ts"),
                                            range: 428..430,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        default: Some(
                                            Yield(
                                                ExprYield {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 434..441,
                                                    value: Some(
                                                        NumberLiteral(
                                                            ExprNumberLiteral {
                                                                node_index: AtomicNodeIndex(..),
                                                                range: 440..441,
                                                                value: Int(
                                                                    1,
                                                                ),
                                                            },
                                                        ),
                                                    ),
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 443..445,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 447..450,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 447..450,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 481..506,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("t"),
                        range: 485..486,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 486..499,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 487..498,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 487..488,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: Some(
                                            Named(
                                                ExprNamed {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 491..497,
                                                    target: Name(
                                                        ExprName {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 491..492,
                                                            id: Name("x"),
                                                            ctx: Store,
                                                        },
                                                    ),
                                                    value: NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 496..497,
                                                            value: Int(
                                                                1,
                                                            ),
                                                        },
                                                    ),
                                                },
                                            ),
                                        ),
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 499..501,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 503..506,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 503..506,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 543..569,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("u"),
                        range: 547..548,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 548..562,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 549..561,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 549..550,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: Some(
                                            Named(
                                                ExprNamed {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 554..560,
                                                    target: Name(
                                                        ExprName {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 554..555,
                                                            id: Name("x"),
                                                            ctx: Store,
                                                        },
                                                    ),
                                                    value: NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 559..560,
                                                            value: Int(
                                                                1,
                                                            ),
                                                        },
                                                    ),
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 562..564,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 566..569,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 566..569,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 607..635,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("v"),
                        range: 611..612,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 612..628,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVarTuple(
                                    TypeParamTypeVarTuple {
                                        range: 613..627,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("Ts"),
                                            range: 614..616,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        default: Some(
                                            Named(
                                                ExprNamed {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 620..626,
                                                    target: Name(
                                                        ExprName {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 620..621,
                                                            id: Name("x"),
                                                            ctx: Store,
                                                        },
                                                    ),
                                                    value: NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 625..626,
                                                            value: Int(
                                                                1,
                                                            ),
                                                        },
                                                    ),
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 628..630,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 632..635,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 632..635,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 676..705,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("w"),
                        range: 680..681,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 681..698,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                ParamSpec(
                                    TypeParamParamSpec {
                                        range: 682..697,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("Ts"),
                                            range: 684..686,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        default: Some(
                                            Named(
                                                ExprNamed {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 690..696,
                                                    target: Name(
                                                        ExprName {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 690..691,
                                                            id: Name("x"),
                                                            ctx: Store,
                                                        },
                                                    ),
                                                    value: NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 695..696,
                                                            value: Int(
                                                                1,
                                                            ),
                                                        },
                                                    ),
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 698..700,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 702..705,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 702..705,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 742..768,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("t"),
                        range: 746..747,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 747..761,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 748..760,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 748..749,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: Some(
                                            Await(
                                                ExprAwait {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 752..759,
                                                    value: NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 758..759,
                                                            value: Int(
                                                                1,
                                                            ),
                                                        },
                                                    ),
                                                },
                                            ),
                                        ),
                                        default: None,
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 761..763,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 765..768,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 765..768,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 800..827,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("u"),
                        range: 804..805,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 805..820,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVar(
                                    TypeParamTypeVar {
                                        range: 806..819,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("T"),
                                            range: 806..807,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        bound: None,
                                        default: Some(
                                            Await(
                                                ExprAwait {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 811..818,
                                                    value: NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 817..818,
                                                            value: Int(
                                                                1,
                                                            ),
                                                        },
                                                    ),
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 820..822,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 824..827,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 824..827,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 860..889,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("v"),
                        range: 864..865,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 865..882,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                TypeVarTuple(
                                    TypeParamTypeVarTuple {
                                        range: 866..881,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("Ts"),
                                            range: 867..869,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        default: Some(
                                            Await(
                                                ExprAwait {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 873..880,
                                                    value: NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 879..880,
                                                            value: Int(
                                                                1,
                                                            ),
                                                        },
                                                    ),
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 882..884,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 886..889,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 886..889,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
            FunctionDef(
                StmtFunctionDef {
                    node_index: AtomicNodeIndex(..),
                    range: 925..955,
                    is_async: false,
                    decorator_list: [],
                    name: Identifier {
                        id: Name("w"),
                        range: 929..930,
                        node_index: AtomicNodeIndex(..),
                    },
                    type_params: Some(
                        TypeParams {
                            range: 930..948,
                            node_index: AtomicNodeIndex(..),
                            type_params: [
                                ParamSpec(
                                    TypeParamParamSpec {
                                        range: 931..947,
                                        node_index: AtomicNodeIndex(..),
                                        name: Identifier {
                                            id: Name("Ts"),
                                            range: 933..935,
                                            node_index: AtomicNodeIndex(..),
                                        },
                                        default: Some(
                                            Await(
                                                ExprAwait {
                                                    node_index: AtomicNodeIndex(..),
                                                    range: 939..946,
                                                    value: NumberLiteral(
                                                        ExprNumberLiteral {
                                                            node_index: AtomicNodeIndex(..),
                                                            range: 945..946,
                                                            value: Int(
                                                                1,
                                                            ),
                                                        },
                                                    ),
                                                },
                                            ),
                                        ),
                                    },
                                ),
                            ],
                        },
                    ),
                    parameters: Parameters {
                        range: 948..950,
                        node_index: AtomicNodeIndex(
                            0,
                        ),
                        posonlyargs: [],
                        args: [],
                        vararg: None,
                        kwonlyargs: [],
                        kwarg: None,
                    },
                    returns: None,
                    body: [
                        Expr(
                            StmtExpr {
                                node_index: AtomicNodeIndex(..),
                                range: 952..955,
                                value: EllipsisLiteral(
                                    ExprEllipsisLiteral {
                                        node_index: AtomicNodeIndex(..),
                                        range: 952..955,
                                    },
                                ),
                            },
                        ),
                    ],
                },
            ),
        ],
    },
)
```
## Semantic Syntax Errors

  |
1 | def d[T]() -> (await 1): ...
  |                ^^^^^^^ Syntax Error: await expression cannot be used within a type annotation
2 | def e[T](arg: (await 1)): ...
3 | def f[T]() -> (y := 3): ...
  |


  |
1 | def d[T]() -> (await 1): ...
2 | def e[T](arg: (await 1)): ...
  |                ^^^^^^^ Syntax Error: await expression cannot be used within a type annotation
3 | def f[T]() -> (y := 3): ...
4 | def g[T](arg: (x := 1)): ...
  |


  |
1 | def d[T]() -> (await 1): ...
2 | def e[T](arg: (await 1)): ...
3 | def f[T]() -> (y := 3): ...
  |                ^^^^^^ Syntax Error: named expression cannot be used within a type annotation
4 | def g[T](arg: (x := 1)): ...
5 | def h[T](x: (yield 1)): ...
  |


  |
2 | def e[T](arg: (await 1)): ...
3 | def f[T]() -> (y := 3): ...
4 | def g[T](arg: (x := 1)): ...
  |                ^^^^^^ Syntax Error: named expression cannot be used within a type annotation
5 | def h[T](x: (yield 1)): ...
6 | def j[T]() -> (yield 1): ...
  |


  |
3 | def f[T]() -> (y := 3): ...
4 | def g[T](arg: (x := 1)): ...
5 | def h[T](x: (yield 1)): ...
  |              ^^^^^^^ Syntax Error: yield expression cannot be used within a type annotation
6 | def j[T]() -> (yield 1): ...
7 | def l[T](x: (yield from 1)): ...
  |


  |
4 | def g[T](arg: (x := 1)): ...
5 | def h[T](x: (yield 1)): ...
6 | def j[T]() -> (yield 1): ...
  |                ^^^^^^^ Syntax Error: yield expression cannot be used within a type annotation
7 | def l[T](x: (yield from 1)): ...
8 | def n[T]() -> (yield from 1): ...
  |


  |
5 | def h[T](x: (yield 1)): ...
6 | def j[T]() -> (yield 1): ...
7 | def l[T](x: (yield from 1)): ...
  |              ^^^^^^^^^^^^ Syntax Error: yield expression cannot be used within a type annotation
8 | def n[T]() -> (yield from 1): ...
9 | def p[T: (yield 1)](): ...      # yield in TypeVar bound
  |


   |
 6 | def j[T]() -> (yield 1): ...
 7 | def l[T](x: (yield from 1)): ...
 8 | def n[T]() -> (yield from 1): ...
   |                ^^^^^^^^^^^^ Syntax Error: yield expression cannot be used within a type annotation
 9 | def p[T: (yield 1)](): ...      # yield in TypeVar bound
10 | def q[T = (yield 1)](): ...     # yield in TypeVar default
   |


   |
 7 | def l[T](x: (yield from 1)): ...
 8 | def n[T]() -> (yield from 1): ...
 9 | def p[T: (yield 1)](): ...      # yield in TypeVar bound
   |           ^^^^^^^ Syntax Error: yield expression cannot be used within a TypeVar bound
10 | def q[T = (yield 1)](): ...     # yield in TypeVar default
11 | def r[*Ts = (yield 1)](): ...   # yield in TypeVarTuple default
   |


   |
 8 | def n[T]() -> (yield from 1): ...
 9 | def p[T: (yield 1)](): ...      # yield in TypeVar bound
10 | def q[T = (yield 1)](): ...     # yield in TypeVar default
   |            ^^^^^^^ Syntax Error: yield expression cannot be used within a TypeVar default
11 | def r[*Ts = (yield 1)](): ...   # yield in TypeVarTuple default
12 | def s[**Ts = (yield 1)](): ...  # yield in ParamSpec default
   |


   |
 9 | def p[T: (yield 1)](): ...      # yield in TypeVar bound
10 | def q[T = (yield 1)](): ...     # yield in TypeVar default
11 | def r[*Ts = (yield 1)](): ...   # yield in TypeVarTuple default
   |              ^^^^^^^ Syntax Error: yield expression cannot be used within a TypeVarTuple default
12 | def s[**Ts = (yield 1)](): ...  # yield in ParamSpec default
13 | def t[T: (x := 1)](): ...       # named expr in TypeVar bound
   |


   |
10 | def q[T = (yield 1)](): ...     # yield in TypeVar default
11 | def r[*Ts = (yield 1)](): ...   # yield in TypeVarTuple default
12 | def s[**Ts = (yield 1)](): ...  # yield in ParamSpec default
   |               ^^^^^^^ Syntax Error: yield expression cannot be used within a ParamSpec default
13 | def t[T: (x := 1)](): ...       # named expr in TypeVar bound
14 | def u[T = (x := 1)](): ...      # named expr in TypeVar default
   |


   |
11 | def r[*Ts = (yield 1)](): ...   # yield in TypeVarTuple default
12 | def s[**Ts = (yield 1)](): ...  # yield in ParamSpec default
13 | def t[T: (x := 1)](): ...       # named expr in TypeVar bound
   |           ^^^^^^ Syntax Error: named expression cannot be used within a TypeVar bound
14 | def u[T = (x := 1)](): ...      # named expr in TypeVar default
15 | def v[*Ts = (x := 1)](): ...    # named expr in TypeVarTuple default
   |


   |
12 | def s[**Ts = (yield 1)](): ...  # yield in ParamSpec default
13 | def t[T: (x := 1)](): ...       # named expr in TypeVar bound
14 | def u[T = (x := 1)](): ...      # named expr in TypeVar default
   |            ^^^^^^ Syntax Error: named expression cannot be used within a TypeVar default
15 | def v[*Ts = (x := 1)](): ...    # named expr in TypeVarTuple default
16 | def w[**Ts = (x := 1)](): ...   # named expr in ParamSpec default
   |


   |
13 | def t[T: (x := 1)](): ...       # named expr in TypeVar bound
14 | def u[T = (x := 1)](): ...      # named expr in TypeVar default
15 | def v[*Ts = (x := 1)](): ...    # named expr in TypeVarTuple default
   |              ^^^^^^ Syntax Error: named expression cannot be used within a TypeVarTuple default
16 | def w[**Ts = (x := 1)](): ...   # named expr in ParamSpec default
17 | def t[T: (await 1)](): ...       # await in TypeVar bound
   |


   |
14 | def u[T = (x := 1)](): ...      # named expr in TypeVar default
15 | def v[*Ts = (x := 1)](): ...    # named expr in TypeVarTuple default
16 | def w[**Ts = (x := 1)](): ...   # named expr in ParamSpec default
   |               ^^^^^^ Syntax Error: named expression cannot be used within a ParamSpec default
17 | def t[T: (await 1)](): ...       # await in TypeVar bound
18 | def u[T = (await 1)](): ...      # await in TypeVar default
   |


   |
15 | def v[*Ts = (x := 1)](): ...    # named expr in TypeVarTuple default
16 | def w[**Ts = (x := 1)](): ...   # named expr in ParamSpec default
17 | def t[T: (await 1)](): ...       # await in TypeVar bound
   |           ^^^^^^^ Syntax Error: await expression cannot be used within a TypeVar bound
18 | def u[T = (await 1)](): ...      # await in TypeVar default
19 | def v[*Ts = (await 1)](): ...    # await in TypeVarTuple default
   |


   |
16 | def w[**Ts = (x := 1)](): ...   # named expr in ParamSpec default
17 | def t[T: (await 1)](): ...       # await in TypeVar bound
18 | def u[T = (await 1)](): ...      # await in TypeVar default
   |            ^^^^^^^ Syntax Error: await expression cannot be used within a TypeVar default
19 | def v[*Ts = (await 1)](): ...    # await in TypeVarTuple default
20 | def w[**Ts = (await 1)](): ...   # await in ParamSpec default
   |


   |
17 | def t[T: (await 1)](): ...       # await in TypeVar bound
18 | def u[T = (await 1)](): ...      # await in TypeVar default
19 | def v[*Ts = (await 1)](): ...    # await in TypeVarTuple default
   |              ^^^^^^^ Syntax Error: await expression cannot be used within a TypeVarTuple default
20 | def w[**Ts = (await 1)](): ...   # await in ParamSpec default
   |


   |
18 | def u[T = (await 1)](): ...      # await in TypeVar default
19 | def v[*Ts = (await 1)](): ...    # await in TypeVarTuple default
20 | def w[**Ts = (await 1)](): ...   # await in ParamSpec default
   |               ^^^^^^^ Syntax Error: await expression cannot be used within a ParamSpec default
   |
