def METHOD_NAME(stderr_fileno: int, msg: str) -> None:
    """Used to send stderr on a raw filehandle _before_ stdio replacement.
    TODO: This method will be removed as part of #7654.
    """
    with os.fdopen(stderr_fileno, mode="w", closefd=False) as stderr:
        print(msg, file=stderr, flush=True)