def METHOD_NAME(self, feats, curr_sample_rate):
    def resample(x, factor):
        return F.interpolate(x.view(1, 1, -1), scale_factor=factor).squeeze()
    if feats.dim() == 2:
        feats = feats.mean(-1)
    if curr_sample_rate != self.sample_rate:
        factor = self.sample_rate / curr_sample_rate
        feats = resample(feats, factor)
    assert feats.dim() == 1, feats.dim()
    return feats