class_docstr: A helper class for managing pool of workers.
class_docstr_tok: ["A","helper","class","for","managing","pool","of","workers","."]
docstr: Determine the number of jobs which are going to run in parallel
code: def effective_n_jobs(self, n_jobs):
      """Determine the number of jobs which are going to run in parallel"""
      if n_jobs == 0:
          raise ValueError("n_jobs == 0 in Parallel has no meaning")
      elif mp is None or n_jobs is None:
          # multiprocessing is not available or disabled, fallback
          # to sequential mode
          return 1
      elif n_jobs < 0:
          n_jobs = max(mp.cpu_count() + 1 + n_jobs, 1)
      return n_jobs
  
imports: import gc
  import os
  import sys
  import warnings
  import threading
  from abc import ABCMeta, abstractmethod
  from .format_stack import format_exc
  from .my_exceptions import WorkerInterrupt, TransportableException
  from ._multiprocessing_helpers import mp
  from ._compat import with_metaclass
label_desc: Use image node_id 1 for calling the PoolManagerMixin obj's underlying member method code with example usage: obj.effective_n_jobs(n_jobs) and returns: n_jobs, int