def merge_internal_state(self, state_tuple):
    """Merges internal state of the evaluation with the current state.

    Args:
      state_tuple: state tuple representing evaluation state: should be of type
        ObjectDetectionEvaluationState.
    """
    (num_gt_instances_per_class, scores_per_class, tp_fp_labels_per_class,
     num_gt_imgs_per_class, num_images_correctly_detected_per_class) = (
         state_tuple)
    assert self.num_class == len(num_gt_instances_per_class)
    assert self.num_class == len(scores_per_class)
    assert self.num_class == len(tp_fp_labels_per_class)
    for i in range(self.num_class):
      self.scores_per_class[i].extend(scores_per_class[i])
      self.tp_fp_labels_per_class[i].extend(tp_fp_labels_per_class[i])
      self.num_gt_instances_per_class[i] += num_gt_instances_per_class[i]
      self.num_gt_imgs_per_class[i] += num_gt_imgs_per_class[i]
      self.num_images_correctly_detected_per_class[
          i] += num_images_correctly_detected_per_class[i]
Merges internal state of the evaluation with the current state.

    Args:
      state_tuple: state tuple representing evaluation state: should be of type
        ObjectDetectionEvaluationState.
    
inference_api/src/main/object_detection/utils/object_detection_evaluation.py