def METHOD_NAME(self, sample):
    if (
        hasattr(self.config.dataset, "subsampling")
        and self.config.dataset.subsampling is not None
        and self.config.dataset.subsampling > 1
    ):
        for key in sample:
            if torch.is_tensor(sample[key]):
                sample[key] = self.flat_subsample(sample[key])
    return sample