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 __init__(
      self,
      name: Text,
      ptransform: beam.PTransform,
      schema: Optional[schema_pb2.Schema] = None,
  ) -> None:
      self._ptransform = ptransform
      super(TransformStatsGenerator, self).__init__(name, schema)
  
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 1 to create a new TransformStatsGenerator object from inherited base classes: StatsGenerator with example: obj = TransformStatsGenerator(name, ptransform, schema)