code: def test_append_to_existing_dataset_works(self):
      data_dir = tempfile.mkdtemp("data_dir")
      ds_info = _dataset_info(data_dir)
      writer = sequential_writer.SequentialWriter(
          ds_info=ds_info, max_examples_per_shard=3
      )
      writer.initialize_splits(["train"])
      writer.add_examples(
          {"train": list(tfds.as_numpy(_generate_split(4)))}
      )
      writer.close_splits(
          ["train"]
      )  # The split should have 2 shards with 4 examples
  
      new_writer = sequential_writer.SequentialWriter(
          ds_info=ds_info, max_examples_per_shard=2, overwrite=False
      )
      new_writer.initialize_splits(["train"], fail_if_exists=False)
      new_writer.add_examples(
          {"train": list(tfds.as_numpy(_generate_split(3)))}
      )
      new_writer.close_splits(
          ["train"]
      )  # We added 2 shards with 3 examples
  
      ds_builder = tfds.builder_from_directory(data_dir)
      self.assertEqual(ds_builder.info.splits["train"].num_shards, 4)
      counter = (
          ds_builder.as_dataset(split="train")
          .reduce(0, lambda v, _: v + 1)
          .numpy()
      )
      self.assertEqual(counter, 7)
  
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 14 for calling the SequentialWriterTest obj's underlying member method code with example usage: obj.test_append_to_existing_dataset_works() without return types