code: def _process_windows_merge_stack(self, func, **kwargs):
          
          ji_results = self._process_windows(func, **kwargs)
          for idx_layer in range(len(ji_results[0])):  # this is the number of output layers
              for j in np.unique(self.windows_row):
                  win_indices_j = np.where(self.windows_row == j)[0]
                  layer_merged_j = np.hstack([ji_results[idx][idx_layer] for idx in win_indices_j])
                  if j == 0:
                      layer_merged = layer_merged_j
                  else:
                      layer_merged = np.vstack([layer_merged, layer_merged_j])
              if idx_layer == 0:
                  layers_merged = layer_merged
              else:
                  layers_merged = np.stack([layers_merged, layer_merged], axis=2)
          return layers_merged
docs: Load (resampled) array of all windows, apply custom function on it, merge and stack results to one array.