code: def _create_contribution_bounding_errors(
      sum_metrics: metrics.SumMetrics,
  ) -> metrics.ContributionBoundingErrors:
      """Creates ContributionBoundingErrors from per-partition metrics."""
      l0_mean = sum_metrics.expected_l0_bounding_error
      l0_var = sum_metrics.std_l0_bounding_error**2
      l0_mean_var = metrics.MeanVariance(mean=l0_mean, var=l0_var)
      linf_min = sum_metrics.clipping_to_min_error
      linf_max = sum_metrics.clipping_to_max_error
      return metrics.ContributionBoundingErrors(
          l0=l0_mean_var, linf_min=linf_min, linf_max=linf_max
      )
  
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 2 for calling a global function with example usage: _create_contribution_bounding_errors(sum_metrics) and returns: metrics