class_docstr: A text dataset with one sequence as input and a label.
class_docstr_tok: ["A","text","dataset","with","one","sequence","as","input","and","a","label","."]
docstr: Returns an iterator with bucketed batches for the provided dataset.
docstr_tok: ["Returns","an","iterator","with","bucketed","batches","for","the","provided","dataset","."]
code: def get_bucketed_batches(
      self,
      batch_size: int,
      bucket_size: int,
      max_input_length: int,
      drop_remainder: bool = False,
      shuffle: bool = False,
      shuffle_seed: Optional[int] = None,
      dataset: Optional[tf.data.Dataset] = None,
  ):
      """Returns an iterator with bucketed batches for the provided dataset."""
      if dataset is None:
          dataset = self.examples
      return get_bucketed_batches(
          dataset,
          batch_size,
          bucket_size,
          max_input_length,
          self.padded_shapes,
          self.example_length_fn,
          shuffle=shuffle,
          shuffle_seed=shuffle_seed,
          drop_remainder=drop_remainder,
      )
  
imports: from typing import Any, Dict, Optional
  from absl import logging
  import numpy
  import tensorflow
  import tensorflow_datasets
  import tensorflow_text
  import vocabulary
label_desc: Use image node_id 7 for calling the TextDataset obj's underlying member method code with example usage: obj.get_bucketed_batches(batch_size, bucket_size, max_input_length, drop_remainder, shuffle, shuffle_seed, dataset) and returns: get_bucketed_batches