# 1. Setup network connection
    check_capture_exists(Client_IP_3, Client_port[3])
    pupil_remote, pub_socket = setup_pupil_remote_connection(Client_IP_3, Client_port[3])

check_capture_exists(Client_IP_4, Client_port[3])
    pupil_remote2, pub_socket2 = setup_pupil_remote_connection(Client_IP_4, Client_port[3])

    # 2. Setup local clock function
    local_clock = time.perf_counter

    # 3. Measure clock offset accounting for network latency
    stable_offset_mean = measure_clock_offset_stable(
        pupil_remote, clock_function=local_clock, n_samples=10
    )

    pupil_time_actual = request_pupil_time(pupil_remote)
    local_time_actual = local_clock()
    pupil_time_calculated_locally = local_time_actual + stable_offset_mean
    print(f"Pupil time actual: {pupil_time_actual}")
    print(f"Local time actual: {local_time_actual}")
    print(f"Stable offset: {stable_offset_mean}")
    print(f"Pupil time (calculated locally): {pupil_time_calculated_locally}")

    # 4. Prepare and send annotations
    # Start the annotations plugin
    notify(
        pupil_remote,
        {"subject": "start_plugin", "name": "Annotation_Capture", "args": {}},
    )
    # Start groups plugin
    notify(
        pupil_remote,
        {"subject": "start_plugin", "name": "Pupil_Groups", "args": {}},
    )

    notify(pupil_remote,
           {"subject": "recording.should_start", "remote_notify": "all"}
           )

    notify(
        pupil_remote2,
        {"subject": "start_plugin", "name": "Annotation_Capture", "args": {}},
    )
    # Start groups plugin
    notify(
        pupil_remote2,
        {"subject": "start_plugin", "name": "Pupil_Groups", "args": {}},
    )

    notify(pupil_remote2,
           {"subject": "recording.should_start", "remote_notify": "all"}
           )

    notification = {"subject": "recording.should_start", "remote_notify": "all"}
    notification_end = {"subject": "recording.should_stop", "remote_notify": "all"}

    topic = f"notify.{notification}"
    payload = serializer.dumps(notification)

 ## START EYETRACKING ACQUISITION
    pupil_remote.send_string(f"notify.{notification['subject']}", flags=zmq.SNDMORE)
    pupil_remote.send(payload)
    print(pupil_remote.recv_string())

local_time = local_clock()
                    duration = 0.0
                    minimal_trigger = new_trigger(“Test”, duration, local_time + stable_offset_mean)
                    send_trigger(pub_socket, minimal_trigger)