def METHOD_NAME(prefix_data_path, out_path,
                                            action_dict, fps):
    label_path = os.path.join(prefix_data_path)
    label_txt_name_list = os.listdir(label_path)
    labels_dict = {}
    labels_dict["fps"] = fps
    labels_list = []
    for label_name in tqdm(label_txt_name_list, desc='label convert:'):
        label_dict = {}
        label_dict["url"] = label_name.split(".")[0] + ".mp4"
        label_txt_path = os.path.join(prefix_data_path, label_name)
        with open(label_txt_path, "r", encoding='utf-8') as f:
            gt = f.read().split("\n")[:-1]
        label_dict["total_frames"] = len(gt)
        boundary_index_list = [0]
        before_action_name = gt[0]
        for index in range(1, len(gt)):
            if before_action_name != gt[index]:
                boundary_index_list.append(index)
                before_action_name = gt[index]
        actions_list = []
        for index in range(len(boundary_index_list) - 1):
            if gt[boundary_index_list[index]] != "None":
                action_name = gt[boundary_index_list[index]]
                start_sec = float(boundary_index_list[index]) / float(fps)
                end_sec = float(boundary_index_list[index + 1] - 1) / float(fps)
                action_id = action_dict[action_name]
                label_action_dict = {}
                label_action_dict["label_names"] = action_name
                label_action_dict["start_id"] = start_sec
                label_action_dict["end_id"] = end_sec
                label_action_dict["label_ids"] = [action_id]
                actions_list.append(label_action_dict)
        label_dict["actions"] = actions_list
        labels_list.append(label_dict)
    labels_dict["gts"] = labels_list
    output_path = os.path.join(out_path, "output.json")
    f = open(output_path, "w", encoding='utf-8')
    f.write(json.dumps(labels_dict, indent=4))
    f.close()