from __future__ import annotations

from typing import Any

from paddle.utils import gast

RETURN_NO_VALUE_MAGIC_NUM: float
RETURN_NO_VALUE_VAR_NAME: str

class ReplaceReturnNoneTransformer(gast.NodeTransformer):
    root: Any = ...
    def __init__(self, root_node: Any) -> None: ...
    def transform(self) -> None: ...
    def visit_Return(self, node: Any): ...

class ReturnAnalysisVisitor(gast.NodeVisitor):
    root: Any = ...
    function_def: Any = ...
    count_return: Any = ...
    max_return_length: Any = ...
    def __init__(self, root_node: Any) -> None: ...
    def visit_FunctionDef(self, node: Any): ...
    def visit_Return(self, node: Any) -> None: ...
    def get_func_return_count(self, func_node: Any): ...
    def get_func_max_return_length(self, func_node: Any): ...

class ReturnTransformer(gast.NodeTransformer):
    wrapper_root: Any = ...
    root: Any = ...
    ancestor_nodes: Any = ...
    return_value_name: Any = ...
    return_name: Any = ...
    return_no_value_name: Any = ...
    function_def: Any = ...
    pre_analysis: Any = ...
    def __init__(self, wrapper_root: Any) -> None: ...
    def transform(self) -> None: ...
    def generic_visit(self, node: Any) -> None: ...
    def visit(self, node: Any): ...
    def visit_FunctionDef(self, node: Any): ...
    def visit_Return(self, node: Any) -> None: ...
