code: def callable(self, nans=False):
          jitfunc = nb.njit(self.func, nogil=True)
          def _loop(sortidx, group_idx, a, ret):
              size = len(ret)
              group_idx_srt = group_idx[sortidx]
              a_srt = a[sortidx]
              indices = step_indices(group_idx_srt)
              for i in range(len(indices) - 1):
                  start_idx, stop_idx =  indices[i], indices[i + 1]
                  ri = group_idx_srt[start_idx]
                  if ri < 0:
                      raise ValueError("negative indices not supported")
                  if ri >= size:
                      raise ValueError("one or more indices in group_idx are too large")
                  ret[ri] = jitfunc(a_srt[start_idx:stop_idx])
          return nb.njit(_loop, nogil=True)