def METHOD_NAME(args, tr_set, dim):
    for s in tr_set:
        print('')
        print('Preprocessing', s, 'data...', end='')
        todo = list(Path(os.path.join(args.data_path, s)).rglob("*.flac"))
        print(len(todo), 'audio files found in', s)
        if args.name == 'None':
            output_dir = os.path.join(args.output_path, '_'.join(['libri', str(args.feature_type)+str(dim)]))
        else:
            output_dir = os.path.join(args.output_path, args.name)
        if not os.path.exists(output_dir): os.makedirs(output_dir)
        cur_path = os.path.join(output_dir, s)
        if not os.path.exists(cur_path): os.makedirs(cur_path)
        print('Extracting acoustic feature...', flush=True)
        tr_x = Parallel(n_jobs=args.n_jobs)(delayed(extract_feature)(str(file), feature=args.feature_type, \
                                            delta=args.delta, delta_delta=args.delta_delta, cmvn=args.apply_cmvn, \
                                            save_feature=os.path.join(cur_path, str(file).split('/')[-1].replace('.flac', ''))) for file in tqdm(todo))
        # sort by len
        sorted_todo = [os.path.join(s, str(todo[idx]).split('/')[-1].replace('.flac', '.npy')) for idx in reversed(np.argsort(tr_x))]
        # Dump data
        df = pd.DataFrame(data={'file_path':[fp for fp in sorted_todo], 'length':list(reversed(sorted(tr_x))), 'label':'None'})
        df.to_csv(os.path.join(output_dir, s + '.csv'))
    print('All done, saved at', output_dir, 'exit.')