def METHOD_NAME(signum: int, frame: typing.Optional[types.FrameType]) -> None:
    # The loop may or may not be running, depending on the state of the application when this occurs.
    # Signals on POSIX only occur on the main thread usually, too, so we need to ensure this is
    # threadsafe.
    # We log native thread IDs purely for debugging purposes.
    if _LOGGER.isEnabledFor(ux.TRACE):
        _LOGGER.log(
            ux.TRACE,
            "interrupt %s occurred on thread %s, process on thread %s will be notified shortly\n"
            "Stacktrace for developer sanity:\n%s",
            signum,
            threading.get_native_id(),
            loop_thread_id,
            "".join(traceback.format_stack(frame)),
        )
    loop.call_soon_threadsafe(_raise_interrupt, signum)