code: def check_n_jobs(n_jobs: int) -> int:
      """Check `n_jobs` parameter according to the scikit-learn convention.
  
      Parameters
      ----------
      n_jobs : int, positive or -1
          The number of jobs for parallelization.
  
      Returns
      -------
      n_jobs : int
          Checked number of jobs.
      """
      # scikit-learn convention
      # https://scikit-learn.org/stable/glossary.html#term-n-jobs
      if n_jobs is None:
          return 1
      elif not is_int(n_jobs):
          raise ValueError(
              f"`n_jobs` must be None or an integer, but found: {n_jobs}"
          )
      elif n_jobs < 0:
          return os.cpu_count() - n_jobs + 1
      else:
          return n_jobs
  
imports: import os
  from datetime import timedelta
  from typing import Union
  import numpy
  import pandas
label_desc: Use image node_id 16 for calling a global function with example usage: check_n_jobs(n_jobs) and returns: int, unknown, n_jobs