from __future__ import annotations

from typing import Any

from paddle.fluid.framework import Block as Block

LEARNING_RATE_DECAY_COUNTER: str
OP_ROLE_VAR_ATTR_NAME: Any
RPC_OP_ROLE_ATTR_NAME: Any
OPT_OP_ROLE_ATTR_VALUE: Any
LR_SCHED_OP_ROLE_ATTR_VALUE: Any

def get_op_by_type(block: Any, op_type: Any): ...
def add_listen_and_serv_pass(program: Any, config: Any): ...
def add_rpc_global_flags_pass(program: Any, config: Any): ...
def add_optimizer_pass(program: Any, config: Any): ...
def large_scale_sparse_pass(program: Any, main_program: Any, config: Any, is_startup: bool = ...): ...
def get_distributed_from_listen_and_serv(program: Any, origin_program: Any): ...
def delete_unused_in_main_pass(program: Any, config: Any): ...
def delete_unused_in_startup_pass(program: Any, main_program: Any, config: Any): ...
def build_pserver_startup_program_pass(program: Any, p_main_program: Any, config: Any): ...
def add_geo_optimizer_pass(program: Any, config: Any): ...
