class_docstr: Aggregate combine function.
  
  This function really does three things:
    1. Batching of FeaturesPredictionsLabels.
    3. "Partial reduction" of these batches by sending this through the
       "intro metrics" step.
    3. The "normal" combining of MetricVariables.
  
  What we really want to do is conceptually the following:
  Predictions | GroupByKey() | KeyAwareBatchElements()
              | ParDo(IntroMetrics()) | CombineValues(CombineMetricVariables()).
  
  but there's no way to KeyAwareBatchElements in Beam, and no way to do partial
  reductions either. Hence, this CombineFn has to do the work of batching,
  partial reduction (intro metrics), and actual combining, all in one.
  
  We do this by accumulating FeaturesPredictionsLabels in the combine state
  until we accumulate a large enough batch, at which point we send them
  through the "intro metrics" step. When merging, we merge the metric variables
  and accumulate FeaturesPredictionsLabels accordingly. We do one final
  "intro metrics" and merge step before producing the final output value.
  
  See also:
  BEAM-3737: Key-aware batching function
  (https://issues.apache.org/jira/browse/BEAM-3737).
class_docstr_tok: ["Aggregate","combine","function",".","This","function","really","does","three","things",":","1",".","Batching","of","FeaturesPredictionsLabels",".","3",".","``","Partial","reduction","''","of","these","batches","by","sending","this","through","the","``","intro","metrics","''","step",".","3",".","The","``","normal","''","combining","of","MetricVariables",".","What","we","really","want","to","do","is","conceptually","the","following",":","Predictions","|","GroupByKey","(",")","|","KeyAwareBatchElements","(",")","|","ParDo","(","IntroMetrics","(",")",")","|","CombineValues","(","CombineMetricVariables","(",")",")",".","but","there","'s","no","way","to","KeyAwareBatchElements","in","Beam",",","and","no","way","to","do","partial","reductions","either",".","Hence",",","this","CombineFn","has","to","do","the","work","of","batching",",","partial","reduction","(","intro","metrics",")",",","and","actual","combining",",","all","in","one",".","We","do","this","by","accumulating","FeaturesPredictionsLabels","in","the","combine","state","until","we","accumulate","a","large","enough","batch",",","at","which","point","we","send","them","through","the","``","intro","metrics","''","step",".","When","merging",",","we","merge","the","metric","variables","and","accumulate","FeaturesPredictionsLabels","accordingly",".","We","do","one","final","''","intro","metrics","''","and","merge","step","before","producing","the","final","output","value",".","See","also",":","BEAM-3737",":","Key-aware","batching","function","(","https",":","\/\/issues.apache.org\/jira\/browse\/BEAM-3737",")","."]
code: def create_accumulator(self) -> _AggState:
      return _AggState(desired_batch_size=self._desired_batch_size)
  
imports: from typing import Any, Dict, Iterable, List, Optional
  import apache_beam
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_metrics_graph import eval_metrics_graph
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.utils import model_util
  from tensorflow_model_analysis.utils import size_estimator
label_desc: Use image node_id 3 for calling the _EvalSavedModelCombiner obj's underlying member method code with example usage: obj.create_accumulator() and returns: _AggState