code: def test_split(self):
      ds = tf.data.Dataset.from_tensor_slices(
          [[0, 1], [1, 1], [0, 0], [1, 0]]
      )
      data = dataset.Dataset(
          dataset=ds, label_names=["pos", "neg"], size=4
      )
      train_data, test_data = data.split(fraction=0.5)
  
      self.assertLen(train_data, 2)
      for i, elem in enumerate(train_data._dataset):
          self.assertTrue((elem.numpy() == np.array([i, 1])).all())
      self.assertEqual(train_data.num_classes, 2)
      self.assertEqual(train_data.label_names, ["pos", "neg"])
  
      self.assertLen(test_data, 2)
      for i, elem in enumerate(test_data._dataset):
          self.assertTrue((elem.numpy() == np.array([i, 0])).all())
      self.assertEqual(test_data.num_classes, 2)
      self.assertEqual(test_data.label_names, ["pos", "neg"])
  
file_path: mediapipe/mediapipe/model_maker/python/vision/image_classifier/dataset_test.py
imports: import os
  import random
  import numpy
  import tensorflow
  from mediapipe.model_maker.python.vision.core import image_utils
  from mediapipe.model_maker.python.vision.core import test_utils
  from mediapipe.model_maker.python.vision.image_classifier import dataset
label_desc: Use image node_id 2 for calling the DatasetTest obj's underlying member method code with example usage: obj.test_split() without return types