code: def get_baseline_value(
      eval_result: tfma.EvalResult,
      baseline_name: Text,
      metric_name: Text,
  ) -> float:
      """Looks through the evaluation result for the value of the baseline slice.
  
      Args:
        eval_result: Loaded eval result from running TensorFlow Model Analysis.
        baseline_name: Name of the baseline slice, 'Overall' or a specified tuple.
        metric_name: Name of the metric on which to perform comparisons.
  
      Returns:
        Percentage value of the baseline slice name requested.
  
      Raises:
        Value error if the baseline slice is not found in eval_results.
      """
      for metrics_tuple in eval_result.slicing_metrics:
          slice_tuple = metrics_tuple[0]
          if baseline_name == "Overall" and not slice_tuple:
              return _get_metric_value(metrics_tuple[1], metric_name)
          if baseline_name == slice_tuple:
              return _get_metric_value(metrics_tuple[1], metric_name)
      raise ValueError(
          "Could not find baseline %s in eval_result: %s"
          % (baseline_name, eval_result)
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Any, Dict, Mapping, Text
  import tensorflow_model_analysis
label_desc: Use image node_id 3 for calling a global function with example usage: get_baseline_value(eval_result, baseline_name, metric_name) and returns: _get_metric_value, _get_metric_value