class_docstr: A beam.PTransform that implements NonStreamingCustomStatsGenerator.
class_docstr_tok: ["A","beam.PTransform","that","implements","NonStreamingCustomStatsGenerator","."]
docstr: Estimates the user defined statistic.
docstr_tok: ["Estimates","the","user","defined","statistic","."]
code: def expand(
      self, pcoll: beam.pvalue.PCollection
  ) -> beam.pvalue.PCollection:
      """Estimates the user defined statistic."""
  
      return (
          pcoll
          | "AssignBatchToPartition"
          >> self._stats_fn.partitioner(self._num_partitions)
          | "GroupPartitionsIntoList"
          >> beam.CombinePerKey(
              _SampleRecordBatchRows(self._max_examples_per_partition)
          )
          | "ProcessPartition"
          >> beam.Map(_process_partition, stats_fn=self._stats_fn)
          | "ComputeMetaStats"
          >> beam.CombinePerKey(
              PartitionedStatisticsAnalyzer(
                  min_partitions_stat_presence=self._min_partitions_stat_presence
              )
          )
      )
  
imports: import collections
  import functools
  from typing import Dict, Iterable, Text, Tuple
  import apache_beam
  import numpy
  import pyarrow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import stats_util
  from tfx_bsl.arrow import table_util
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 2 for calling the _GenerateNonStreamingCustomStats obj's underlying member method code with example usage: obj.expand(pcoll) and returns: unknown