code: def _unnest_metrics(
      metrics: List[metrics.PerPartitionMetrics],
  ) -> Iterable[Tuple[Any, metrics.PerPartitionMetrics]]:
      """Unnests metrics from different configurations."""
      for i, metric in enumerate(metrics):
          yield ((i, None), metric)
          if metrics[0].metric_errors:
              partition_size = metrics[0].metric_errors[0].sum
          else:
              # Select partitions case.
              partition_size = metrics[
                  0
              ].raw_statistics.privacy_id_count
          # Emits metrics for computing histogram by partition size.
          bucket = _get_lower_bound(partition_size)
          yield ((i, bucket), metric)
  
file_path: pipelinedp/analysis/utility_analysis.py
imports: from typing import Any, Iterable, List, Tuple, Union
  import pipeline_dp
  from pipeline_dp import pipeline_backend
  import analysis
  from analysis import data_structures
  from analysis import metrics
  from analysis import utility_analysis_engine
  from analysis import cross_partition_combiners
  import copy
  import bisect
label_desc: Use image node_id 6 for calling a global function with example usage: _unnest_metrics(metrics) without return types