def METHOD_NAME(panic):
    master = FakeMaster()
    cb = WatchdogCallback()
    watchdog = spwd.Watchdog(master, 0.01, callback=cb)
    watchdog.start()
    try:
        # Let first check succeed.
        cb.wait()
        assert not panic.was_called
        # Simulate error checking lease.
        master.error = Exception("Inquire error")
        # Wait for the next check.
        cb.resume()
        cb.wait()
        assert panic.was_called
    finally:
        cb.resume()
        watchdog.stop()