code: def test_pooling_batcher(self):
      data = [
          RowData(
              {"text": "something"}, {"a": i, "b": 10 + i, "c": 20 + i}
          )
          for i in range(10)
      ]
      batcher = PoolingBatcher(train_batch_size=3, pool_num_batches=2)
      batches = list(
          batcher.batchify(data, sort_key=lambda x: x.numberized["a"])
      )
  
      self.assertEqual(len(batches), 4)
      a_vals = {a for raw_batch, batch in batches for a in batch["a"]}
      self.assertSetEqual(a_vals, set(range(10)))
      for raw_batch, batch in batches[:2]:
          self.assertEqual(
              [{"text": "something"}] * len(raw_batch), list(raw_batch)
          )
          self.assertGreater(batch["a"][0], batch["a"][-1])
          for a in batch["a"]:
              self.assertLess(a, 6)
      for _, batch in batches[2:]:
          for a in batch["a"]:
              self.assertGreaterEqual(a, 6)
  
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 2 for calling the BatcherTest obj's underlying member method code with example usage: obj.test_pooling_batcher() without return types