class_docstr: A StatsGenerator which wraps an arbitrary Beam PTransform.
  
  This class computes statistics using a user-provided Beam PTransform. The
  PTransform must accept a Beam PCollection where each element is a tuple
  containing a slice key and an Arrow RecordBatch representing a batch of
  examples. It must return a PCollection where each element is a tuple
  containing a slice key and a DatasetFeatureStatistics proto representing the
  statistics of a slice.
code: def ptransform(self):
      return self._ptransform
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Any, Dict, Generic, Hashable, Iterable, List, Optional, Text, TypeVar
  import apache_beam
  import pyarrow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import input_batch
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 2 for calling the TransformStatsGenerator obj's underlying member method code with example usage: obj.ptransform() and returns: self