examples/legacy/token-classification/utils_ner.py/TFTokenClassificationDataset/get_dataset
class TFTokenClassificationDataset:        def get_dataset(self):
            self.dataset = self.dataset.apply(tf.data.experimental.assert_cardinality(len(self.features)))

            return self.dataset