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: Initializes ComposableSplitter.
  
  Args:
    proto: Proto message to split.
    proto_as_initial_chunk: Whether to initialize chunks with the
      user-provided proto as the initial chunk.
    parent_splitter: The parent `ComposableSplitter` object.
    fields_in_parent: Fields to access `proto` from the parent splitter's
      proto.
docstr_tok: ["Initializes","ComposableSplitter",".","Args",":","proto",":","Proto","message","to","split",".","proto_as_initial_chunk",":","Whether","to","initialize","chunks","with","the","user-provided","proto","as","the","initial","chunk",".","parent_splitter",":","The","parent","`","ComposableSplitter","`","object",".","fields_in_parent",":","Fields","to","access","`","proto","`","from","the","parent","splitter's","proto","."]
code: def __init__(
      self,
      proto,
      *,
      proto_as_initial_chunk: bool = True,
      parent_splitter: Optional["ComposableSplitter"] = None,
      fields_in_parent: Optional[util.FieldTypes] = None,
  ):
      """Initializes ComposableSplitter.
  
      Args:
        proto: Proto message to split.
        proto_as_initial_chunk: Whether to initialize chunks with the
          user-provided proto as the initial chunk.
        parent_splitter: The parent `ComposableSplitter` object.
        fields_in_parent: Fields to access `proto` from the parent splitter's
          proto.
      """
      self._proto = proto
      self._parent_splitter = parent_splitter
      self._fields_in_parent = fields_in_parent
  
      # Whether chunks have been created. See `build_chunks()`.
      self._built = False
  
      # Keep a list of chunk ids in the order in which they were added to the
      # list.
      self._add_chunk_order = []
      self._fix_chunk_order = False
  
      # Initialize chunks and ChunkedMessage (optionally with the first chunk as
      # the user-provided proto.
      if parent_splitter is not None:
          # If this is not the root Splitter class, skip the initialization of
          # the chunks/message since the parent's will be updated instead.
          self._chunks = None
          self._chunked_message = None
      elif proto_as_initial_chunk:
          self._chunks = [self._proto]
          self._chunked_message = chunk_pb2.ChunkedMessage(
              chunk_index=0
          )
          self._add_chunk_order.append(id(self._proto))
      else:
          self._chunks = []
          self._chunked_message = chunk_pb2.ChunkedMessage()
  
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 1 to create a new ComposableSplitter object from inherited base classes: Splitter with example: obj = ComposableSplitter(proto)