def METHOD_NAME(args: Args):
    data = get_data(path=args.data_path, smiles_columns=args.smiles_columns)
    num_data = len(data)
    if args.split_type == 'random':
        all_indices = list(range(num_data))
        fold_indices = split_indices(all_indices, args.num_folds, scaffold=False)
    elif args.split_type == 'scaffold':
        all_indices = list(range(num_data))
        fold_indices = split_indices(all_indices, args.num_folds, scaffold=True, split_key_molecule=args.split_key_molecule, data=data)
    else:
        raise ValueError
    random.shuffle(fold_indices)
    for i in range(args.test_folds_to_test):
        all_splits = []
        for j in range(1, args.val_folds_per_test + 1):
            os.makedirs(os.path.join(args.save_dir, args.split_type, f'fold_{i}', f'{j - 1}'), exist_ok=True)
            with open(os.path.join(args.save_dir, args.split_type, f'fold_{i}', f'{j - 1}', 'split_indices.pckl'),
                      'wb') as wf:
                val_idx = (i + j) % args.num_folds
                val = fold_indices[val_idx]
                test = fold_indices[i]
                train = []
                for k in range(args.num_folds):
                    if k != i and k != val_idx:
                        train.append(fold_indices[k])
                train = np.concatenate(train)
                pickle.dump([train, val, test], wf)
                all_splits.append([train, val, test])
        with open(os.path.join(args.save_dir, args.split_type, f'fold_{i}', 'split_indices.pckl'), 'wb') as wf:
            pickle.dump(all_splits, wf)