docs: def _process_corpus(self, corpus, output_path, processing_func, frame_size=400, hop_size=160, sr=None):
          """ Utility function for processing a corpus with a separate processing function. """
          feat_container = containers.FeatureContainer(output_path)
          feat_container.open()
  
          sampling_rate = -1
  
          for utterance in corpus.utterances.values():
              utt_sampling_rate = utterance.sampling_rate
  
              if sr is None:
                  if sampling_rate > 0 and sampling_rate != utt_sampling_rate:
                      raise ValueError(
                          'File {} has a different sampling-rate than the previous ones!'.format(utterance.track.idx))
  
                  sampling_rate = utt_sampling_rate
  
              processing_func(utterance, feat_container, frame_size, hop_size, sr, corpus)
  
          tf_frame_size, tf_hop_size = self.frame_transform(frame_size, hop_size)
          feat_container.frame_size = tf_frame_size
          feat_container.hop_size = tf_hop_size
          feat_container.sampling_rate = sr or sampling_rate
  
          feat_container.close()
  
          return feat_container