def METHOD_NAME():
    parser = argparse.ArgumentParser()
    parser.add_argument("--dir", required=True, type=str, default=None,
                        help="feats.scp")
    parser.add_argument("--out", required=True, type=str, default=None,
                        help="The prefix of dumpped files.")
    parser.add_argument("--n_spk", type=int, default=4)
    parser.add_argument("--no_pbar", default=False, action="store_true")
    parser.add_argument("--sr", type=int, default=16000)
    parser.add_argument("--emb_type", type=str, default="rand")
    args = parser.parse_args()
    if not os.path.exists(os.path.dirname(args.out)):
        os.makedirs(os.path.dirname(args.out))
    idx_scp = open(os.path.join(args.dir, "idx"), "r").readlines()
    idx_scp = [x.strip() for x in idx_scp]
    meeting2rttms = {}
    for one_line in open(os.path.join(args.dir, "sys.rttm"), "rt"):
        parts = [x for x in one_line.strip().split(" ") if x != ""]
        mid, st, dur, spk_name = parts[1], float(parts[3]), float(parts[4]), parts[7]
        if mid not in meeting2rttms:
            meeting2rttms[mid] = []
        meeting2rttms[mid].append(one_line)
    utt2spk = load_scp_as_dict(os.path.join(args.dir, "utt2spk"))
    utt2xvec = load_scp_as_dict(os.path.join(args.dir, "utt2xvec"))
    spk2utt = {}
    for utt, spk in utt2spk.items():
        if utt in utt2xvec:
            if spk not in spk2utt:
                spk2utt[spk] = []
            spk2utt[spk].append(utt)
    meeting2spk_list = {}
    for mid, rttms in meeting2rttms.items():
        meeting2spk_list[mid] = calc_spk_list(rttms)
        new_spk_list = []
        for spk in meeting2spk_list[mid]:
            if spk in spk2utt:
                new_spk_list.append(spk)
        if len(new_spk_list) != len(meeting2spk_list[mid]):
            print("{}: Reduce speaker number from {}(according rttm) to {}(according x-vectors)".format(
                mid, len(meeting2spk_list[mid]), len(new_spk_list)))
        meeting2spk_list[mid] = new_spk_list
    meeting_lens = process(idx_scp, spk2utt, utt2xvec, meeting2spk_list, args)
    print("Total meetings: {:6d}".format(len(meeting_lens)))