def METHOD_NAME(visualizer_queue, cur_source_id, source_paths, max_image_size, trg_time_step):
    """Produces live frame from the active video source"""
    cap = None
    last_source_id = cur_source_id.value
    while True:
        start_time = time.perf_counter()
        if cur_source_id.value != last_source_id:
            last_source_id = cur_source_id.value
            cap.release()
            cap = None
        source_name, source_path = source_paths[cur_source_id.value]
        if cap is None:
            cap = cv2.VideoCapture(source_path)
            cap.set(cv2.CAP_PROP_BUFFERSIZE, 1)
        _, frame = cap.read()
        if frame is None:
            cap.set(cv2.CAP_PROP_POS_FRAMES, 0)
            _, frame = cap.read()
            assert frame is not None
        trg_frame_size = list(frame.shape[:2])
        if np.max(trg_frame_size) > max_image_size:
            if trg_frame_size[0] == np.max(trg_frame_size):
                trg_frame_size[1] = int(float(max_image_size) / float(trg_frame_size[0]) * float(trg_frame_size[1]))
                trg_frame_size[0] = max_image_size
            else:
                trg_frame_size[0] = int(float(max_image_size) * float(trg_frame_size[0]) / float(trg_frame_size[1]))
                trg_frame_size[1] = max_image_size
        frame = cv2.resize(frame, (trg_frame_size[1], trg_frame_size[0]))
        cv2.putText(frame, 'GT Gesture: {}'.format(source_name), (10, frame.shape[0] - 10),
                    cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 0), 2)
        visualizer_queue.put(np.copy(frame), True)
        end_time = time.perf_counter()
        elapsed_time = end_time - start_time
        rest_time = trg_time_step - elapsed_time
        if rest_time > 0.0:
            time.sleep(rest_time)