class_docstr: A stats generator meant to be used as a part of a composite generator.
  
  A constituent stats generator facilitates sharing logic between several stats
  generators. It is functionally identical to a beam.CombineFn, but it expects
  add_input to be called with instances of InputBatch.
docstr: Prepares this constituent generator.
  
  Subclasses should put costly initializations here instead of in
  __init__(), so that 1) the cost is properly recognized by Beam as
  setup cost (per worker) and 2) the cost is not paid at the pipeline
  construction time.
docstr_tok: ["Prepares","this","constituent","generator",".","Subclasses","should","put","costly","initializations","here","instead","of","in","__init__","(",")",",","so","that","1",")","the","cost","is","properly","recognized","by","Beam","as","setup","cost","(","per","worker",")","and","2",")","the","cost","is","not","paid","at","the","pipeline","construction","time","."]
code: def setup(self) -> None:
      """Prepares this constituent generator.
  
      Subclasses should put costly initializations here instead of in
      __init__(), so that 1) the cost is properly recognized by Beam as
      setup cost (per worker) and 2) the cost is not paid at the pipeline
      construction time.
      """
      pass
  
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 for calling the ConstituentStatsGenerator obj's underlying member method code with example usage: obj.setup() without return types