class_docstr: kws task 
docstr: make tf dataset
docstr_tok: ["make","tf","dataset"]
code: def dataset(self, mode, batch_size, epoch):
      """make tf dataset"""
      shapes, types = self.feature_spec()
      ds = tf.data.Dataset.from_generator(  # pylint: disable=invalid-name
          generator=lambda: self.generate_data(),  # pylint: disable=unnecessary-lambda
          output_types=types,
          output_shapes=shapes,
      )
  
      if mode == utils.TRAIN:
          ds = ds.apply(  # pylint: disable=invalid-name
              tf.data.experimental.shuffle_and_repeat(
                  buffer_size=batch_size, count=epoch, seed=None
              )
          )
  
      def make_sample(feat, label):
          return {"inputs": feat, "labels": label}, label
  
      return ds.apply(
          tf.data.experimental.map_and_batch(
              make_sample, batch_size, drop_remainder=False
          )
      ).prefetch(tf.data.experimental.AUTOTUNE)
  
file_path: delta/delta/data/task/kws_cls_task.py
imports: import struct
  import numpy
  import delta.compat
  from delta import utils
  from delta.utils.register import registers
  from delta.data.task.base_speech_task import SpeechTask
  from delta.data.utils.htk_reader_lib import HtkReaderIO
label_desc: Use image node_id 7 for calling the KwsClsTask obj's underlying member method code with example usage: obj.dataset(mode, batch_size, epoch) and returns: ds, dict,  label