code: def step_indices(group_idx):
      
      ilen = step_count(group_idx) + 1
      indices = np.empty(ilen, np.int64)
      indices[0] = 0
      indices[-1] = group_idx.size
      cmp_pos = 0
      ri = 1
      for i in range(len(group_idx)):
          if group_idx[cmp_pos] != group_idx[i]:
              cmp_pos = i
              indices[ri] = i
              ri += 1
      return indices
docs: Return the edges of areas within group_idx, which are filled with the same value.