class_docstr: A combine_fn wrapper which returns the accumulator as the output value.
  
  This is intended to allow invoking CombineFns in settings where you might need
  to subsequently merge the results before calling extract_output. A typical use
  of a _AccumulateOnlyCombineFn might look like:
  
      c = OtherCombineFn()
  
      # combine per key, but don't call extract_output()
      accumulators = [p | beam.CombinePerKey(_AccumulateOnlyCombineFn(c)
                      for i in range(3)]
  
      # create two different lists of accumulator PCollections
      even_accumulators = [a for i, a in enumerate(accumulators) if i % 2 == 0]
  
      # extract output on the two different sets of accumulators without
      # recomputing the even accumulators
      even_output = (even_accumulators | beam.Flatten()
          | beam.CombinePerKey(_AccumulatorCombineFn(c)))
      all_output = (accumulators | beam.Flatten()
          | beam.CombinePerKey(_AccumulatorCombineFn(c)))
class_docstr_tok: ["A","combine_fn","wrapper","which","returns","the","accumulator","as","the","output","value",".","This","is","intended","to","allow","invoking","CombineFns","in","settings","where","you","might","need","to","subsequently","merge","the","results","before","calling","extract_output",".","A","typical","use","of","a","_AccumulateOnlyCombineFn","might","look","like",":","c","=","OtherCombineFn","(",")","#","combine","per","key",",","but","do","n't","call","extract_output","(",")","accumulators","=","[","p","|","beam.CombinePerKey","(","_AccumulateOnlyCombineFn","(","c",")","for","i","in","range","(","3",")","]","#","create","two","different","lists","of","accumulator","PCollections","even_accumulators","=","[","a","for","i",",","a","in","enumerate","(","accumulators",")","if","i","%","2","==","0","]","#","extract","output","on","the","two","different","sets","of","accumulators","without","#","recomputing","the","even","accumulators","even_output","=","(","even_accumulators","|","beam.Flatten","(",")","|","beam.CombinePerKey","(","_AccumulatorCombineFn","(","c",")",")",")","all_output","=","(","accumulators","|","beam.Flatten","(",")","|","beam.CombinePerKey","(","_AccumulatorCombineFn","(","c",")",")",")"]
code: def extract_output(
      self, accumulator: _AccumulatorType
  ) -> _AccumulatorType:
      return accumulator
  
imports: from typing import Optional, Set, Tuple, TypeVar
  import apache_beam
  import numpy
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.evaluators import confidence_intervals_util
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.slicer import slicer_lib
  from tensorflow_model_analysis.utils import beam_util
label_desc: Use image node_id 1 for calling the _AccumulateOnlyCombineFn obj's underlying member method code with example usage: obj.extract_output(accumulator) and returns: accumulator