def flatten(self):
        header_data = self._msg_generator(self.headers)
        return header_data, self.message
This version is a bit more 'correct', it mimics the skimage.transform.resize function.
dataset/ETHPy150Open slimta/python-slimta/slimta/envelope.py/Envelope.flatten--crossover with--dataset/ETHPy150Open benanne/kaggle-galaxies/realtime_augmentation.py/build_ds_transform