class_docstr: A DoFn that loads the model and predicts.
code: def _batch_reducible_process(
      self, elements: List[types.Extracts]
  ) -> Sequence[types.Extracts]:
      serialized_examples = [x[constants.INPUT_KEY] for x in elements]
  
      # Compute features, predictions, and labels for each serialized_example
      result = []
      for model_name, loaded_model in self._loaded_models.items():
          for i, fetched in enumerate(
              loaded_model.predict_list(serialized_examples)
          ):
              if i >= len(result):
                  element_copy = copy.copy(elements[fetched.input_ref])
                  for key in fetched.values:
                      if key in _FEATURES_PREDICTIONS_LABELS_KEY_MAP:
                          if self._eval_config:
                              element_copy[
                                  _FEATURES_PREDICTIONS_LABELS_KEY_MAP[
                                      key
                                  ]
                              ] = fetched.values[key]
                          continue
                      element_copy[key] = fetched.values[key]
                  if self._eval_config:
                      element_copy[
                          constants.EXAMPLE_WEIGHTS_KEY
                      ] = self._get_example_weights(
                          model_name,
                          element_copy[constants.FEATURES_KEY],
                      )
                  if len(self._loaded_models) == 1:
                      if not self._eval_config:
                          element_copy[
                              constants.FEATURES_PREDICTIONS_LABELS_KEY
                          ] = loaded_model.as_features_predictions_labels(
                              [fetched]
                          )[
                              0
                          ]
                  else:
                      if not self._eval_config:
                          raise ValueError(
                              "PredictExtractor can only be used with multi-output models "
                              "if eval_config is passed."
                          )
                      # If only one model, the predictions are stored without using a dict
                      element_copy[constants.PREDICTIONS_KEY] = {
                          model_name: element_copy[
                              constants.PREDICTIONS_KEY
                          ]
                      }
                  result.append(element_copy)
              else:
                  element_copy = result[i]
                  # Assume values except for predictions are same for all models.
                  element_copy[constants.PREDICTIONS_KEY][
                      model_name
                  ] = fetched.values[
                      eval_saved_model_constants.PREDICTIONS_NAME
                  ]
      if self._eval_config:
          return [_wrap_as_batched_extract(result)]
      return result
  
imports: import collections
  import copy
  from typing import Any, Dict, List, Optional, Sequence
  import apache_beam
  import numpy
  import pyarrow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_saved_model import constants
  from tensorflow_model_analysis.extractors import extractor
  from tensorflow_model_analysis.extractors import legacy_feature_extractor
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import model_util
label_desc: Use image node_id 3 for calling the _TFMAPredictionDoFn obj's underlying member method code with example usage: obj._batch_reducible_process(elements) and returns: result, list