def METHOD_NAME(duthost, gnxi_path, ptfhost, filter_event_regex, op_file, thread_timeout):
    cmd = generate_client_cli(duthost=duthost, gnxi_path=gnxi_path, method=METHOD_SUBSCRIBE,
                              submode=SUBMODE_ONCHANGE, update_count=1, xpath="all[heartbeat=2]",
                              target="EVENTS", filter_event_regex=filter_event_regex)
    results = [""]
    event_thread = InterruptableThread(target=listen_for_event, args=(ptfhost, cmd, results,))
    event_thread.start()
    event_thread.join(thread_timeout)  # close thread after 30 sec, was not able to find event within reasonable time
    assert results[0] != "", "No output from PTF docker, thread timed out after {} seconds".format(thread_timeout)
    # regex logic and then to write to file
    result = results[0]
    event_str = fetch_json_ptf_output(EVENT_REGEX, result, 0)
    event_str = event_str.replace('\\', '')
    event_json = json.loads(event_str)
    with open(op_file, "w") as f:
        f.write("[\n")
        json.dump(event_json, f, indent=4)
        f.write("\n]")
        f.close()