class_docstr: API for generating data statistics.
  
  Example:
  
  ```python
    with beam.Pipeline(runner=...) as p:
      _ = (p
           | 'ReadData' >> tfx_bsl.public.tfxio.TFExampleRecord(data_location)
               .BeamSource()
           | 'GenerateStatistics' >> GenerateStatistics()
           | 'WriteStatsOutput' >> tfdv.WriteStatisticsToTFRecord(output_path))
  ```
class_docstr_tok: ["API","for","generating","data","statistics",".","Example",":","``","`","python","with","beam.Pipeline","(","runner=","...",")","as","p",":","_","=","(","p","|","'ReadData","'",">",">","tfx_bsl.public.tfxio.TFExampleRecord","(","data_location",")",".BeamSource","(",")","|","'GenerateStatistics","'",">",">","GenerateStatistics","(",")","|","'WriteStatsOutput","'",">",">","tfdv.WriteStatisticsToTFRecord","(","output_path",")",")","``","`"]
docstr: Initializes the transform.
  
  Args:
    options: `tfdv.StatsOptions` for generating data statistics.
  
  Raises:
    TypeError: If options is not of the expected type.
docstr_tok: ["Initializes","the","transform",".","Args",":","options",":","`","tfdv.StatsOptions","`","for","generating","data","statistics",".","Raises",":","TypeError",":","If","options","is","not","of","the","expected","type","."]
code: def __init__(
      self,
      options: stats_options.StatsOptions = stats_options.StatsOptions(),
  ) -> None:
      """Initializes the transform.
  
      Args:
        options: `tfdv.StatsOptions` for generating data statistics.
  
      Raises:
        TypeError: If options is not of the expected type.
      """
      if not isinstance(options, stats_options.StatsOptions):
          raise TypeError(
              "options is of type %s, should be a StatsOptions."
              % type(options).__name__
          )
      self._options = options
  
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 GenerateStatistics object from inherited base classes: beam with example: obj = GenerateStatistics(options)