def test_get_cached_stats(self):
    expected_train_stats = {'examples': 3, 'inputs_tokens': 36, 'inputs_max_tokens': 13, 'targets_tokens': 18, 'targets_max_tokens': 6}
    self.assertEqual(expected_train_stats, self.cached_task.get_cached_stats('train'))
    self.assertEqual(expected_train_stats, self.cached_task.get_cached_stats('train'))
    expected_validation_stats = {'examples': 2, 'inputs_tokens': 23, 'inputs_max_tokens': 12, 'targets_tokens': 36, 'targets_max_tokens': 21}
    self.assertEqual(expected_validation_stats, self.cached_task.get_cached_stats('validation'))
    with self.assertRaisesWithLiteralMatch(ValueError, "Stats do not exist for 'cached_task' split: fake"):
        self.cached_task.get_cached_stats('fake')
    with self.assertRaisesWithLiteralMatch(AssertionError, "'uncached_task' does not exist in any of the task cache directories."):
        self.uncached_task.get_cached_stats('train')
def test_get_cached_stats(self):
    expected_train_stats = {'examples': 3, 'inputs_tokens': 36, 'inputs_max_tokens': 13, 'targets_tokens': 18, 'targets_max_tokens': 6}
    self.assertEqual(expected_train_stats, self.cached_task.get_cached_stats('train'))
    self.assertEqual(expected_train_stats, self.cached_task.get_cached_stats('train'))
    expected_validation_stats = {'examples': 2, 'inputs_tokens': 23, 'inputs_max_tokens': 12, 'targets_tokens': 36, 'targets_max_tokens': 21}
    self.assertEqual(expected_validation_stats, self.cached_task.get_cached_stats('validation'))
    with self.assertRaisesWithLiteralMatch(ValueError, "Stats do not exist for 'cached_task' split: fake"):
        self.cached_task.get_cached_stats('fake')
    with self.assertRaisesWithLiteralMatch(AssertionError, "'uncached_task' does not exist in any of the task cache directories."):
        self.uncached_task.get_cached_stats('train')