code: def _sum_metrics_to_metric_utility(
      sum_metrics: metrics.SumMetrics,
      dp_metric: pipeline_dp.Metric,
      partition_keep_probability: float,
      partition_weight: float,
  ) -> metrics.MetricUtility:
      """Creates cross-partition MetricUtility from 1 partition utility.
  
      Attributes:
          sum_metrics: per-partition utility metric.
          dp_metric: metric for which utility is computed (e.g. COUNT)
          partition_keep_probability: partition selection probability.
      """
      data_dropped = _sum_metrics_to_data_dropped(
          sum_metrics, partition_keep_probability, dp_metric
      )
      absolute_error = _sum_metrics_to_value_error(
          sum_metrics, partition_keep_probability, partition_weight
      )
      relative_error = absolute_error.to_relative(sum_metrics.sum)
  
      return metrics.MetricUtility(
          metric=dp_metric,
          noise_std=sum_metrics.std_noise,
          noise_kind=sum_metrics.noise_kind,
          ratio_data_dropped=data_dropped,
          absolute_error=absolute_error,
          relative_error=relative_error,
      )
  
imports: import copy
  import pipeline_dp
  from analysis import metrics
  import dataclasses
  from typing import List, Tuple, Callable
  import math
label_desc: Use image node_id 4 for calling a global function with example usage: _sum_metrics_to_metric_utility(sum_metrics, dp_metric, partition_keep_probability, partition_weight) and returns: metrics