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 add_input(
      self,
      result: "Optional[validation_result_pb2.ValidationResult]",
      new_input: "Optional[validation_result_pb2.ValidationResult]",
  ) -> "Optional[validation_result_pb2.ValidationResult]":
      if new_input is None:
          return None
      if result is None:
          result = validation_result_pb2.ValidationResult(
              validation_ok=True
          )
      result.validation_ok &= new_input.validation_ok
      result.metric_validations_per_slice.extend(
          new_input.metric_validations_per_slice
      )
      metrics_validator.merge_details(result, new_input)
      return result
  
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 3 for calling the CombineValidations obj's underlying member method code with example usage: obj.add_input(result, new_input) and returns: result, None