code: def test_create_batches_with_cache(self):
      data = Data(
          self.data_source,
          self.tensorizers,
          Batcher(train_batch_size=1),
          in_memory=True,
      )
      list(data.batches(Stage.TRAIN))
      self.assertEqual(10, len(data.numberized_cache[Stage.TRAIN]))
  
      data1 = Data(
          self.data_source,
          self.tensorizers,
          Batcher(train_batch_size=1),
          in_memory=True,
      )
      with self.assertRaises(Exception):
          # Concurrent iteration not supported
          batches1 = data1.batches(Stage.TRAIN)
          batches2 = data1.batches(Stage.TRAIN)
          for _ in batches1:
              for _ in batches2:
                  continue
  
imports: import unittest
  from pytext.common.constants import RawExampleFieldName, Stage
  from pytext.data import Batcher, Data, PoolingBatcher
  from pytext.data.data import RowData
  from pytext.data.sources import RawExample
  from pytext.data.sources.data_source import SafeFileWrapper
  from pytext.data.sources.tsv import TSVDataSource
  from pytext.data.tensorizers import LabelTensorizer, TokenTensorizer
  from pytext.data.utils import pad
  from pytext.utils import precision
  from pytext.utils.test import import_tests_module
label_desc: Use image node_id 8 for calling the DataTest obj's underlying member method code with example usage: obj.test_create_batches_with_cache() without return types