"""
This type stub file was generated by pyright.
"""

import contextlib
import functools
from typing import Iterator

@contextlib.contextmanager
def rewrite_exception(old_name: str, new_name: str) -> Iterator[None]:
    """
    Rewrite the message of an exception.
    """
    ...

@functools.lru_cache
def find_stack_level(frame) -> int:
    """
    Find the first place in the stack that is not inside pandas
    (tests notwithstanding).

    ``frame`` should be passed as ``inspect.currentframe()`` by the
    calling function.

    https://stackoverflow.com/questions/17407119/python-inspect-stack-is-slow
    """
    ...

