class_docstr: Save mnist data into TFRecordDataset and get samples from generator
class_docstr_tok: ["Save","mnist","data","into","TFRecordDataset","and","get","samples","from","generator"]
code: def __getitem__(self, slc):
      if isinstance(slc, slice):
          return HMnistDataset(slc, self.batch_size, self.train)
      if isinstance(slc, tuple) and slc[0] == slice(None, None, None):
          return VMnistDataset(slc, self.batch_size, self.train)
      raise IndexError(
          "Only support split dataset horizontally or vertically"
      )
  
imports: import os
  import tensorflow
  from tensorflow.keras.datasets import mnist
  from .convert import decode_data
  from .convert import decode_image
  from .convert import decode_label
  from .convert import save_data
  from .convert import save_image
  from .convert import save_label
label_desc: Use image node_id 2 for calling the MnistDataset obj's underlying member method code with example usage: obj.__getitem__(slc) and returns: HMnistDataset, VMnistDataset