code: def _sum_metrics_to_data_dropped(
      sum_metrics: metrics.SumMetrics,
      partition_keep_probability: float,
      dp_metric: pipeline_dp.Metric,
  ) -> metrics.DataDropInfo:
      """Finds Data drop information from per-partition metrics."""
  
      # This function attributed the data that is dropped, to different reasons
      # how they are dropped.
  
      # 1. linf/l0 contribution bounding
      # Contribution bounding errors are negative, negate to keep data dropped
      # to be positive.
      linf_dropped = (
          sum_metrics.clipping_to_min_error
          - sum_metrics.clipping_to_max_error
      )
      l0_dropped = -sum_metrics.expected_l0_bounding_error
  
      # 2. Partition selection (in case of private partition selection).
      # The data which survived contribution bounding is dropped with probability
      # = 1 - partition_keep_probability.
      expected_after_contribution_bounding = (
          sum_metrics.sum - l0_dropped - linf_dropped
      )
      partition_selection_dropped = (
          expected_after_contribution_bounding
          * (1 - partition_keep_probability)
      )
  
      return metrics.DataDropInfo(
          l0=l0_dropped,
          linf=linf_dropped,
          partition_selection=partition_selection_dropped,
      )
  
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 1 for calling a global function with example usage: _sum_metrics_to_data_dropped(sum_metrics, partition_keep_probability, dp_metric) and returns: metrics