def METHOD_NAME(Ymf, Yleft, Ymaskhemis,
                            vox2mm, surface_folder, fsavgDir, vdist,
                            voxsize_pbt, voxsize_refineCS, th_initial,
                            no_selfintersections, surf, pial = [],
                            nprocesses = 0, debug=False):
    Pcentral_all = []
    Pspherereg_all = []
    Pthick_all = []
    Ppial_all = []
    EC_all = []
    defect_size_all = []
    processes = len(surf)
    if nprocesses > 0:
        processes=min(nprocesses,processes)
    with multiprocessing.Pool(processes=processes) as pool:
        partial_create_cs = functools.partial(
            createCS, Ymf, Yleft, Ymaskhemis, vox2mm,
            surffolder=surface_folder, fsavgDir=fsavgDir, vdist=vdist,
            voxsize_pbt=voxsize_pbt, voxsize_refineCS=voxsize_refineCS,
            th_initial=th_initial, no_selfintersections=no_selfintersections, debug=debug)
        # call pool.map to run in parallel
        results = pool.map(partial_create_cs, surf)
        for r in results:
            Pcentral_all.append(r[0])
            Pspherereg_all.append(r[1])
            Pthick_all.append(r[2])
            EC_all.append(r[3])
            defect_size_all.append(r[4])
        if len(pial) > 0:
            assert all(elem in surf for elem in pial)
            partial_expand_cs = functools.partial(expandCS_wrapper, surffolder=surface_folder, debug=debug)
            # call pool.map to run in parallel
            results = pool.map(partial_expand_cs, pial)
            for r in results:
                Ppial_all.append(r[0])