class_docstr: A Splitter that can be composed with other splitters.
  
  This Splitter writes to the riegeli file format.
  
  See README for details.
class_docstr_tok: ["A","Splitter","that","can","be","composed","with","other","splitters",".","This","Splitter","writes","to","the","riegeli","file","format",".","See","README","for","details","."]
docstr: Adds a new chunk and updates the ChunkedMessage proto.
  
  Args:
    chunk: Proto message or bytes.
    field_tags: Field information about the placement of the chunked data
      within self._proto.
    index: Optional index at which to insert the chunk. The chunk ordering is
      important for merging.
docstr_tok: ["Adds","a","new","chunk","and","updates","the","ChunkedMessage","proto",".","Args",":","chunk",":","Proto","message","or","bytes",".","field_tags",":","Field","information","about","the","placement","of","the","chunked","data","within","self._proto",".","index",":","Optional","index","at","which","to","insert","the","chunk",".","The","chunk","ordering","is","important","for","merging","."]
code: def add_chunk(
      self,
      chunk: Union[message.Message, bytes],
      field_tags: util.FieldTypes,
      index=None,
  ) -> None:
      """Adds a new chunk and updates the ChunkedMessage proto.
  
      Args:
        chunk: Proto message or bytes.
        field_tags: Field information about the placement of the chunked data
          within self._proto.
        index: Optional index at which to insert the chunk. The chunk ordering is
          important for merging.
      """
      if self._parent_splitter is not None:
          self._parent_splitter.add_chunk(
              chunk, self._fields_in_parent + field_tags, index
          )
      else:
          assert self._chunks is not None
          assert self._chunked_message is not None
          field = self._chunked_message.chunked_fields.add(
              field_tag=util.get_field_tag(self._proto, field_tags)
          )
          new_chunk_index = len(self._chunks)
          field.message.chunk_index = new_chunk_index
          self._add_chunk_order.append(id(chunk))
  
          if index is None:
              self._chunks.append(chunk)
          else:
              self._chunks.insert(index, chunk)
              self._fix_chunk_order = True
  
imports: import abc
  from collections.abc import Sequence
  import time
  from typing import Optional, Union
  from absl import logging
  import riegeli
  from google.protobuf import message
  from tensorflow.python.lib.io import file_io
  from tensorflow.tools.proto_splitter import chunk_pb2
  from tensorflow.tools.proto_splitter import util
  from tensorflow.tools.proto_splitter import version
  from tensorflow.tools.proto_splitter import versions_pb2
label_desc: Use image node_id 6 for calling the ComposableSplitter obj's underlying member method code with example usage: obj.add_chunk(chunk, field_tags, index) without return types