from __future__ import annotations

from contextlib import ContextDecorator
from typing import Any

from paddle.fluid.core import TracerEventType

class RecordEvent(ContextDecorator):
    name: Any = ...
    event_type: Any = ...
    event: Any = ...
    def __init__(self, name: str, event_type: TracerEventType = ...) -> None: ...
    def __enter__(self): ...
    def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> Any: ...
    def begin(self) -> None: ...
    def end(self) -> None: ...

def load_profiler_result(filename: str) -> Any: ...
def in_profiler_mode(): ...
def wrap_optimizers(): ...
