code: def range(self, start, stop=None, step=1):
          
          self._assert_active()
          if stop is None:
              start, stop = 0, start
          full_list = range(start, stop, step)
          per_worker = len(full_list) // self._num_threads
          rem = len(full_list) % self._num_threads
          schedule = [
              per_worker + 1 if thread_idx < rem else per_worker
              for thread_idx in range(self._num_threads)
          ]
          # pylint: disable=undefined-variable
          start_idx = _functools.reduce(
              lambda x, y: x + y, schedule[: self.thread_num], 0
          )
          end_idx = start_idx + schedule[self._thread_num]
          return full_list[start_idx:end_idx]
docs: Get the correctly distributed parallel chunks.
  
          This corresponds to using the OpenMP 'static' schedule.