class_docstr: A custom non-streaming statistic.
  
  A PartitionedStatsFn is a custom statistic that cannot be computed in a
  streaming fashion. A user is required to implement the compute function.
  
  NonStreamingCustomStatsGenerator are initialized with
  a PartitionedStatsFn to estimate the PartitionedStatsFn over a large dataset.
  Examples in the dataset will be randomly assigned to a partition. Then the
  compute method will be called on each partition. If the examples in the
  partition contain invalid feature values, implementations of
  PartitionedStatsFn also have the option to "gracefully fail" without returning
  a statistic value for any invalid features.
class_docstr_tok: ["A","custom","non-streaming","statistic",".","A","PartitionedStatsFn","is","a","custom","statistic","that","can","not","be","computed","in","a","streaming","fashion",".","A","user","is","required","to","implement","the","compute","function",".","NonStreamingCustomStatsGenerator","are","initialized","with","a","PartitionedStatsFn","to","estimate","the","PartitionedStatsFn","over","a","large","dataset",".","Examples","in","the","dataset","will","be","randomly","assigned","to","a","partition",".","Then","the","compute","method","will","be","called","on","each","partition",".","If","the","examples","in","the","partition","contain","invalid","feature","values",",","implementations","of","PartitionedStatsFn","also","have","the","option","to","``","gracefully","fail","''","without","returning","a","statistic","value","for","any","invalid","features","."]
docstr: Computes custom statistics over the batch of examples.
  
  Args:
    examples: The batch of examples.
  
  Returns:
    DatasetFeatureStatistics containing the custom statistics for
    each feature in the dataset.
  
    The DatasetFeatureStatistics proto can be constructed using the
    make_dataset_feature_stats_proto method.
docstr_tok: ["Computes","custom","statistics","over","the","batch","of","examples",".","Args",":","examples",":","The","batch","of","examples",".","Returns",":","DatasetFeatureStatistics","containing","the","custom","statistics","for","each","feature","in","the","dataset",".","The","DatasetFeatureStatistics","proto","can","be","constructed","using","the","make_dataset_feature_stats_proto","method","."]
code: def compute(
      self, examples: pa.RecordBatch
  ) -> statistics_pb2.DatasetFeatureStatistics:
      """Computes custom statistics over the batch of examples.
  
      Args:
        examples: The batch of examples.
  
      Returns:
        DatasetFeatureStatistics containing the custom statistics for
        each feature in the dataset.
  
        The DatasetFeatureStatistics proto can be constructed using the
        make_dataset_feature_stats_proto method.
      """
      raise NotImplementedError()
  
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 1 for calling the PartitionedStatsFn obj's underlying member method code with example usage: obj.compute(examples) without return types