def METHOD_NAME(
        process_funcs: Sequence[Tuple[Callable[..., subprocess.Popen[Any]], Tuple[Any, ...]]],
        *,
        job_total: int = -1,
        sleep: float = 0.1,
) -> None:
    """ Takes a list of function arg pairs, each function must return a process
    """
    if job_total == -1:
        import multiprocessing
        job_total = multiprocessing.cpu_count()
        del multiprocessing
    if job_total == 1:
        for func, args in process_funcs:
            sys.stdout.flush()
            sys.stderr.flush()
            process = func(*args)
            process.wait()
    else:
        import time
        processes: List[subprocess.Popen[Any]] = []
        for func, args in process_funcs:
            # wait until a thread is free
            while 1:
                processes[:] = [p for p in processes if p.poll() is None]
                if len(processes) <= job_total:
                    break
                time.sleep(sleep)
            sys.stdout.flush()
            sys.stderr.flush()
            processes.append(func(*args))
        # Don't return until all jobs have finished.
        while 1:
            processes[:] = [p for p in processes if p.poll() is None]
            if not processes:
                break
            time.sleep(sleep)