def METHOD_NAME():
    nonlocal last_write_timestamp
    # 30 messages should be enough to fill the queue even if some of
    # the events are dequeued in the background thread.
    for _ in range(30):
        w.write(b"x" * 64)
        last_write_timestamp = time.time()