code: def create_percentage_difference_dictionary(
      eval_result: tfma.EvalResult,
      baseline_name: Text,
      metric_name: Text,
  ) -> Dict[Text, Any]:
      """Creates dictionary of a % difference between a baseline and other slices.
  
      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:
        Dictionary mapping slices to percentage difference from the baseline slice.
      """
      baseline_value = get_baseline_value(
          eval_result, baseline_name, metric_name
      )
      difference = {}
      for metrics_tuple in eval_result.slicing_metrics:
          slice_key = metrics_tuple[0]
          metrics = metrics_tuple[1]
          # Concatenate feature name/values for intersectional features.
          column = "-".join([elem[0] for elem in slice_key])
          feature_val = "-".join([elem[1] for elem in slice_key])
          if column not in difference:
              difference[column] = {}
          difference[column][feature_val] = (
              _get_metric_value(metrics, metric_name) - baseline_value
          ) / baseline_value
      return difference
  
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 1 for calling a global function with example usage: create_percentage_difference_dictionary(eval_result, baseline_name, metric_name) and returns: difference