code: def combine_results(result_protos, is_classification):
      """Combine results protos from batches into single proto."""
      for i in range(1, len(result_protos)):
          if is_classification:
              for j in range(
                  len(result_protos[i].result.classifications)
              ):
                  result_protos[0].result.classifications.add(
                      classes=result_protos[i]
                      .result.classifications[j]
                      .classes
                  )
          else:
              for j in range(len(result_protos[i].result.regressions)):
                  result_protos[0].result.regressions.add(
                      value=result_protos[i].result.regressions[j].value
                  )
      return result_protos[0]
  
file_path: what-if-tool/utils/platform_utils.py
imports: import csv
  from glob import glob
  from grpc.beta import implementations
  import os
  import random
  from six.moves.urllib.parse import urlparse
  import tensorflow
  from utils import common_utils
  from tensorflow.core.framework import types_pb2
  from tensorflow_serving.apis import classification_pb2
  from tensorflow_serving.apis import predict_pb2
  from tensorflow_serving.apis import prediction_service_pb2
  from tensorflow_serving.apis import regression_pb2
label_desc: Use image node_id 6 for calling a global function with example usage: combine_results(result_protos, is_classification) and returns: result_protos