class_docstr: Allows dynamic batch training, extends pooling batcher with a scheduler
  config, which specifies how batch size should increase
class_docstr_tok: ["Allows","dynamic","batch","training",",","extends","pooling","batcher","with","a","scheduler","config",",","which","specifies","how","batch","size","should","increase"]
docstr: From an iterable of dicts, yield dicts of lists:
  
  1. Load `num_shuffled_pools` pools of data, and shuffle them.
  2. Load a pool (`batch_size * pool_num_batches` examples).
  3. Sort rows, if necessary.
  4. Shuffle the order in which the batches are returned, if necessary.
docstr_tok: ["From","an","iterable","of","dicts",",","yield","dicts","of","lists",":","1",".","Load","`","num_shuffled_pools","`","pools","of","data",",","and","shuffle","them",".","2",".","Load","a","pool","(","`","batch_size","*","pool_num_batches","`","examples",")",".","3",".","Sort","rows",",","if","necessary",".","4",".","Shuffle","the","order","in","which","the","batches","are","returned",",","if","necessary","."]
code: def batchify(
      self,
      iterable: Iterable[RawExample],
      sort_key=None,
      stage=Stage.TRAIN,
  ):
      """
      From an iterable of dicts, yield dicts of lists:
  
      1. Load `num_shuffled_pools` pools of data, and shuffle them.
      2. Load a pool (`batch_size * pool_num_batches` examples).
      3. Sort rows, if necessary.
      4. Shuffle the order in which the batches are returned, if necessary.
      """
      for item in super().batchify(
          iterable=iterable, sort_key=sort_key, stage=stage
      ):
          yield item
      if stage == Stage.TRAIN:
          # only step scheduler when in train
          self.step_epoch()
  
imports: import math
  from typing import Iterable
  from pytext.common.constants import Stage
  from pytext.config.module_config import ModuleConfig
  from .data import PoolingBatcher
  from .sources import RawExample
label_desc: Use image node_id 7 for calling the DynamicPoolingBatcher obj's underlying member method code with example usage: obj.batchify(iterable, sort_key, stage) without return types