nodes: 0, module; 1, function_definition; 2, function_name:callable; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, function_definition; 10, return_statement; 11, identifier:nans; 12, False; 13, comment:"""Compile a jitted function and loop it over the sorted data."""; 14, assignment; 15, function_name:_loop; 16, parameters; 17, block; 18, call; 19, identifier:jitfunc; 20, call; 21, identifier:sortidx; 22, identifier:group_idx; 23, identifier:a; 24, identifier:ret; 25, expression_statement; 26, expression_statement; 27, expression_statement; 28, expression_statement; 29, for_statement; 30, attribute; 31, argument_list; 32, attribute; 33, argument_list; 34, assignment; 35, assignment; 36, assignment; 37, assignment; 38, identifier:i; 39, call; 40, block; 41, identifier:nb; 42, identifier:njit; 43, identifier:_loop; 44, keyword_argument; 45, identifier:nb; 46, identifier:njit; 47, attribute; 48, keyword_argument; 49, identifier:size; 50, call; 51, identifier:group_idx_srt; 52, subscript; 53, identifier:a_srt; 54, subscript; 55, identifier:indices; 56, call; 57, identifier:range; 58, argument_list; 59, expression_statement; 60, expression_statement; 61, if_statement; 62, if_statement; 63, expression_statement; 64, identifier:nogil; 65, True; 66, identifier:self; 67, identifier:func; 68, identifier:nogil; 69, True; 70, identifier:len; 71, argument_list; 72, identifier:group_idx; 73, identifier:sortidx; 74, identifier:a; 75, identifier:sortidx; 76, identifier:step_indices; 77, argument_list; 78, binary_operator:len(indices) - 1; 79, assignment; 80, assignment; 81, comparison_operator:ri < 0; 82, block; 83, comparison_operator:ri >= size; 84, block; 85, assignment; 86, identifier:ret; 87, identifier:group_idx_srt; 88, call; 89, integer:1; 90, pattern_list; 91, expression_list; 92, identifier:ri; 93, subscript; 94, identifier:ri; 95, integer:0; 96, raise_statement; 97, identifier:ri; 98, identifier:size; 99, raise_statement; 100, subscript; 101, call; 102, identifier:len; 103, argument_list; 104, identifier:start_idx; 105, identifier:stop_idx; 106, subscript; 107, subscript; 108, identifier:group_idx_srt; 109, identifier:start_idx; 110, call; 111, call; 112, identifier:ret; 113, identifier:ri; 114, identifier:jitfunc; 115, argument_list; 116, identifier:indices; 117, identifier:indices; 118, identifier:i; 119, identifier:indices; 120, binary_operator:i + 1; 121, identifier:ValueError; 122, argument_list; 123, identifier:ValueError; 124, argument_list; 125, subscript; 126, identifier:i; 127, integer:1; 128, string:"negative indices not supported"; 129, string:"one or more indices in group_idx are too large"; 130, identifier:a_srt; 131, slice; 132, identifier:start_idx; 133, identifier:stop_idx
code: def callable(self, nans=False):
          """Compile a jitted function and loop it over the sorted data."""
          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)