class_docstr: Combines the ValidationResults protos.
  
  Combines PCollection of ValidationResults for different metrics and slices.
class_docstr_tok: ["Combines","the","ValidationResults","protos",".","Combines","PCollection","of","ValidationResults","for","different","metrics","and","slices","."]
code: def extract_output(
      self,
      accumulator: "Optional[validation_result_pb2.ValidationResult]",
  ) -> "Optional[validation_result_pb2.ValidationResult]":
      # Verification fails if there is empty input.
      if not accumulator:
          accumulator = validation_result_pb2.ValidationResult(
              validation_ok=False
          )
      thresholds = metric_specs.metric_thresholds_from_metrics_specs(
          self._eval_config.metrics_specs, eval_config=self._eval_config
      )
      if not thresholds:
          # Default is to validation NOT ok when not rubber stamping.
          accumulator.validation_ok = self._rubber_stamp
          # Default is to missing thresholds when not rubber stamping.
          accumulator.missing_thresholds = not self._rubber_stamp
      missing = metrics_validator.get_missing_slices(
          accumulator.validation_details.slicing_details,
          self._eval_config,
      )
      if missing:
          missing_slices = []
          missing_cross_slices = []
          for m in missing:
              if isinstance(m, config_pb2.SlicingSpec):
                  missing_slices.append(m)
              elif isinstance(m, config_pb2.CrossSlicingSpec):
                  missing_cross_slices.append(m)
          accumulator.validation_ok = False
          if missing_slices:
              accumulator.missing_slices.extend(missing_slices)
          if missing_cross_slices:
              accumulator.missing_cross_slices.extend(
                  missing_cross_slices
              )
      if self._rubber_stamp:
          accumulator.rubber_stamp = True
      return accumulator
  
imports: import itertools
  import os
  from typing import Any, Dict, Iterable, Iterator, List, Optional, Tuple, Union
  from absl import logging
  import apache_beam
  import numpy
  import pyarrow
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.evaluators import evaluator
  from tensorflow_model_analysis.evaluators import metrics_validator
  from tensorflow_model_analysis.metrics import calibration_plot
  from tensorflow_model_analysis.metrics import confusion_matrix_plot
  from tensorflow_model_analysis.metrics import metric_specs
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.post_export_metrics import metric_keys
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.proto import metrics_for_slice_pb2
  from tensorflow_model_analysis.proto import validation_result_pb2
  from tensorflow_model_analysis.slicer import slicer_lib
  from tensorflow_model_analysis.utils import math_util
  from tensorflow_model_analysis.writers import writer
  from google.protobuf import wrappers_pb2
label_desc: Use image node_id 5 for calling the CombineValidations obj's underlying member method code with example usage: obj.extract_output(accumulator) and returns: accumulator