class_docstr: Shard that is being written.
docstr: Writes a new example.
docstr_tok: ["Writes","a","new","example","."]
code: def add_example(self, serialized_example: str) -> None:
      """Writes a new example."""
      self.writer.write(serialized_example)
      self.num_examples += 1
      self.num_bytes += len(serialized_example)
  
imports: from __future__ import annotations
  import dataclasses
  import os
  from typing import Any, Dict, List, Optional
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import example_serializer
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import array_record_module
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 1 for calling the Shard obj's underlying member method code with example usage: obj.add_example(serialized_example) without return types