code: def _get_n_jobs(n_jobs):
      """Get number of jobs for the computation.
  
      This function reimplements the logic of joblib to determine the actual
      number of jobs depending on the cpu count. If -1 all CPUs are used.
      If 1 is given, no parallel computing code is used at all, which is useful
      for debugging. For n_jobs below -1, (n_cpus + 1 + n_jobs) are used.
      Thus for n_jobs = -2, all CPUs but one are used.
  
      Parameters
      ----------
      n_jobs : int
          Number of jobs stated in joblib convention.
  
      Returns
      -------
      n_jobs : int
          The actual number of jobs as positive integer.
  
      Examples
      --------
      >>> from sklearn.utils import _get_n_jobs
      >>> _get_n_jobs(4)
      4
      >>> jobs = _get_n_jobs(-2)
      >>> assert jobs == max(cpu_count() - 1, 1)
      >>> _get_n_jobs(0)
      Traceback (most recent call last):
      ...
      ValueError: Parameter n_jobs == 0 has no meaning.
      """
      if n_jobs < 0:
          return max(cpu_count() + 1 + n_jobs, 1)
      elif n_jobs == 0:
          raise ValueError("Parameter n_jobs == 0 has no meaning.")
      else:
          return n_jobs
  
imports: from collections import Sequence
  import numpy
  from scipy.sparse import issparse
  import warnings
  from .murmurhash import murmurhash3_32
  from .validation import as_float_array, assert_all_finite, check_random_state, column_or_1d, check_array, check_consistent_length, check_X_y, indexable, check_symmetric
  from .deprecation import deprecated
  from .class_weight import compute_class_weight, compute_sample_weight
  from ..externals.joblib import cpu_count
  from ..exceptions import ConvergenceWarning
  from ..exceptions import DataConversionWarning
label_desc: Use image node_id 9 for calling a global function with example usage: _get_n_jobs(n_jobs) and returns: max, n_jobs