def METHOD_NAME(started_event: threading.Event, caught_event: threading.Event):
    try:
        started_event.set()
        while True:
            time.sleep(0.001)
    except Exception as e:
        caught_event.set()
        raise e