code: def _partition_estimators(n_estimators, n_jobs):
      
      # Compute the number of jobs
      if n_jobs == -1:
          n_jobs = min(cpu_count(), n_estimators)
  
      else:
          n_jobs = min(n_jobs, n_estimators)
  
      # Partition estimators between jobs
      n_estimators_per_job = (n_estimators // n_jobs) * np.ones(n_jobs,
                                                                dtype=np.int)
      n_estimators_per_job[:n_estimators % n_jobs] += 1
      starts = np.cumsum(n_estimators_per_job)
  
      return n_jobs, n_estimators_per_job.tolist(), [0] + starts.tolist()
docs: Private function used to partition estimators between jobs.