class_docstr: Abstract data generator.
class_docstr_tok: ["Abstract","data","generator","."]
docstr: Initializes the data generator.
  
  Args:
      model_data: The model data to use.
      batch_size: The batch size(s).
      batch_strategy: The batch strategy.
      shuffle: If 'True', data should be shuffled.
docstr_tok: ["Initializes","the","data","generator",".","Args",":","model_data",":","The","model","data","to","use",".","batch_size",":","The","batch","size","(","s",")",".","batch_strategy",":","The","batch","strategy",".","shuffle",":","If","'True","'",",","data","should","be","shuffled","."]
code: def __init__(
      self,
      model_data: RasaModelData,
      batch_size: Union[int, List[int]],
      batch_strategy: Text = SEQUENCE,
      shuffle: bool = True,
  ):
      """Initializes the data generator.
  
      Args:
          model_data: The model data to use.
          batch_size: The batch size(s).
          batch_strategy: The batch strategy.
          shuffle: If 'True', data should be shuffled.
      """
      self.model_data = model_data
      self.batch_size = batch_size
      self.shuffle = shuffle
      self.batch_strategy = batch_strategy
  
imports: import math
  from typing import List, Union, Text, Optional, Any, Tuple, Dict, cast
  import logging
  import scipy.sparse
  import numpy
  from tensorflow.keras.utils import Sequence
  from rasa.utils.tensorflow.constants import SEQUENCE, BALANCED
  from rasa.utils.tensorflow.model_data import RasaModelData, Data, FeatureArray
label_desc: Use image node_id 1 to create a new RasaDataGenerator object from inherited base classes: Sequence with example: obj = RasaDataGenerator(model_data, batch_size, batch_strategy, shuffle)