code: def test_writes_multiple_splits(self):
      num_examples_train = 5
      num_examples_eval = 7
      max_examples_per_shard = 3
      num_expected_shards_train = 2
      num_expected_shards_eval = 3
  
      data_dir = tempfile.mkdtemp("data_dir")
  
      writer = sequential_writer.SequentialWriter(
          ds_info=_dataset_info(data_dir),
          max_examples_per_shard=max_examples_per_shard,
      )
      writer.initialize_splits(["train", "eval"])
      writer.add_examples(
          {
              "train": list(
                  tfds.as_numpy(_generate_split(num_examples_train))
              ),
              "eval": list(
                  tfds.as_numpy(_generate_split(num_examples_eval))
              ),
          }
      )
      writer.close_splits(["train", "eval"])
      ds_builder = tfds.builder_from_directory(data_dir)
      self.assertEqual(
          ds_builder.info.splits["train"].num_shards,
          num_expected_shards_train,
      )
      self.assertEqual(
          ds_builder.info.splits["eval"].num_shards,
          num_expected_shards_eval,
      )
      counter = (
          ds_builder.as_dataset(split="train")
          .reduce(0, lambda v, _: v + 1)
          .numpy()
      )
      self.assertEqual(counter, num_examples_train)
      counter = (
          ds_builder.as_dataset(split="eval")
          .reduce(0, lambda v, _: v + 1)
          .numpy()
      )
      self.assertEqual(counter, num_examples_eval)
  
imports: import tempfile
  from absl.testing import absltest
  from absl.testing import parameterized
  import tensorflow
  import tensorflow_datasets
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import sequential_writer
label_desc: Use image node_id 3 for calling the SequentialWriterTest obj's underlying member method code with example usage: obj.test_writes_multiple_splits() without return types