code: def test_split(self):
      dataset = tf.data.Dataset.from_tensor_slices(
          [[0, 1], [1, 1], [0, 0], [1, 0]]
      )
      data = ds.Dataset(dataset, 4)
      train_data, test_data = data.split(0.5)
  
      self.assertLen(train_data, 2)
      self.assertIsInstance(train_data, ds.Dataset)
      self.assertIsInstance(test_data, ds.Dataset)
      for i, elem in enumerate(train_data.gen_tf_dataset()):
          self.assertTrue((elem.numpy() == np.array([i, 1])).all())
  
      self.assertLen(test_data, 2)
      for i, elem in enumerate(test_data.gen_tf_dataset()):
          self.assertTrue((elem.numpy() == np.array([i, 0])).all())
  
file_path: mediapipe/mediapipe/model_maker/python/core/data/dataset_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from mediapipe.model_maker.python.core.data import dataset
  from mediapipe.model_maker.python.core.utils import test_util
label_desc: Use image node_id 1 for calling the DatasetTest obj's underlying member method code with example usage: obj.test_split() without return types