class_docstr: A DoFn that extracts the metrics output.
code: def process(
      self,
      element: Tuple[slicer.SliceKeyType, types.MetricVariablesType],
  ) -> Generator[
      Tuple[slicer.SliceKeyType, Dict[str, Any]], None, None
  ]:
      (slice_key, metric_variables) = element
      if metric_variables:
          eval_saved_model = self._loaded_models[""]
          result = (
              eval_saved_model.metrics_set_variables_and_get_values(
                  metric_variables
              )
          )
          yield (slice_key, result)
      else:
          # Increase a counter for empty bootstrap samples. When sampling is not
          # enabled, this should never be exected. This should only occur when the
          # slice sizes are incredibly small, and seeing large values of this
          # counter is a sign that something has gone wrong.
          self._num_bootstrap_empties.inc(1)
  
imports: from typing import Any, Dict, Generator, Iterable, List, Optional, Tuple
  import apache_beam
  import numpy
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_metrics_graph import eval_metrics_graph
  from tensorflow_model_analysis.slicer import slicer_lib
  from tensorflow_model_analysis.utils import model_util
  from tensorflow_model_analysis.utils import size_estimator
label_desc: Use image node_id 2 for calling the _ExtractOutputDoFn obj's underlying member method code with example usage: obj.process(element) without return types