class_docstr: API for writing serialized data statistics to TFRecord file.
class_docstr_tok: ["API","for","writing","serialized","data","statistics","to","TFRecord","file","."]
docstr: Initializes the transform.
  
  Args:
    output_path: The output path or path prefix (if sharded_output=True).
    sharded_output: If true, writes sharded TFRecords files in the form
      output_path-SSSSS-of-NNNNN.
docstr_tok: ["Initializes","the","transform",".","Args",":","output_path",":","The","output","path","or","path","prefix","(","if","sharded_output=True",")",".","sharded_output",":","If","true",",","writes","sharded","TFRecords","files","in","the","form","output_path-SSSSS-of-NNNNN","."]
code: def __init__(self, output_path: Text, sharded_output=False) -> None:
      """Initializes the transform.
  
      Args:
        output_path: The output path or path prefix (if sharded_output=True).
        sharded_output: If true, writes sharded TFRecords files in the form
          output_path-SSSSS-of-NNNNN.
      """
      self._output_path = output_path
      self._sharded_output = sharded_output
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import random
  from typing import Generator, Text, Optional
  import apache_beam
  import pyarrow
  from tensorflow_data_validation.utils import artifacts_io_impl
  from tensorflow_data_validation.statistics import stats_impl
  from tensorflow_data_validation.statistics import stats_options
  from tfx_bsl.statistics import merge_util
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 1 to create a new WriteStatisticsToTFRecord object from inherited base classes: beam with example: obj = WriteStatisticsToTFRecord(output_path, sharded_output)