def METHOD_NAME():
    """
    This fixture was proposed by waynew to allow testing
    an otherwise infinite loop.
    Once https://github.com/saltstack/salt/pull/62910 is merged,
    this can be migrated.
    """
    if sys.platform.startswith("win"):
        pytest.skip("SIGALRM is not available on Windows.")
    def handler(num, frame):
        raise TimeoutError()
    @contextlib.contextmanager
    def _timeout(t=1):
        signal.signal(signal.SIGALRM, handler)
        signal.alarm(t)
        try:
            yield _timeout
        except TimeoutError:
            pass
        finally:
            signal.alarm(0)
    return _timeout