code: def test_get_n_jobs():
      """Check that _get_n_jobs returns expected values"""
  
      jobs = _get_n_jobs(4)
      assert jobs == 4
  
      jobs = -2
      expected = cpu_count() + 1 + jobs
      jobs = _get_n_jobs(jobs)
      assert jobs == expected
  
      assert_raises(ValueError, _get_n_jobs, 0)
  
imports: import numpy
  from sklearn.utils._testing import assert_raises
  from gplearn.utils import _get_n_jobs, check_random_state, cpu_count
label_desc: Use image node_id 2 for calling a global function with example usage: test_get_n_jobs() without return types