'Build a process or thread pool and return the number of workers'

def configure(self, n_jobs=1, parallel=None, **backend_args):

    n_jobs = self.effective_n_jobs(n_jobs)
    if (n_jobs == 1):
        raise FallbackToBackend(SequentialBackend())
    already_forked = int(os.environ.get(self.JOBLIB_SPAWNED_PROCESS, 0))
    if already_forked:
        raise ImportError('[joblib]    Attempting    to    do    parallel    computing    without    protecting    your    import    on    a    system    that    does    not    support    forking.    To    use    parallel-computing    in    a    script,    you    must    protect    your    main    loop    using    "if    __name__    ==    \'__main__\'".    Please    see    the    joblib    documentation    on    Parallel    for    more    information')
    os.environ[self.JOBLIB_SPAWNED_PROCESS] = '1'
    gc.collect()
    self._pool = MemmapingPool(n_jobs, **backend_args)
    self.parallel = parallel
    return n_jobs
