code: def test_w_public_partitions(self, noise_kind, expected_noise_std):
      # Arrange
      aggregator_params = pipeline_dp.AggregateParams(
          noise_kind=noise_kind,
          metrics=[
              pipeline_dp.Metrics.COUNT,
              pipeline_dp.Metrics.PRIVACY_ID_COUNT,
          ],
          max_partitions_contributed=1,
          max_contributions_per_partition=1,
      )
  
      public_partitions = ["pk0", "pk1", "pk101"]
  
      # Input collection has 100 elements, such that each privacy id
      # contributes 1 time and each partition has 1 element.
      col = list(range(100))
      data_extractor = pipeline_dp.DataExtractors(
          privacy_id_extractor=lambda x: x,
          partition_extractor=lambda x: f"pk{x}",
          value_extractor=lambda x: 0,
      )
  
      col, _ = analysis.perform_utility_analysis(
          col=col,
          backend=pipeline_dp.LocalBackend(),
          options=analysis.UtilityAnalysisOptions(
              epsilon=2, delta=1e-10, aggregate_params=aggregator_params
          ),
          data_extractors=data_extractor,
          public_partitions=public_partitions,
      )
  
      col = list(col)
  
      # Assert
      self.assertLen(col, 1)
      report: metrics.UtilityReport = col[0]
  
      self.assertLen(
          report.metric_errors, 2
      )  # COUNT and PRIVACY_ID_COUNT
      errors = report.metric_errors
      [self.assertEqual(e.noise_kind, noise_kind) for e in errors]
      [
          self.assertEqual(e.noise_std, expected_noise_std)
          for e in errors
      ]
  
imports: import copy
  from absl.testing import absltest
  from absl.testing import parameterized
  import pipeline_dp
  import analysis
  from analysis import metrics
  from analysis import utility_analysis
  from analysis.tests import common
  from typing import Optional
label_desc: Use image node_id 5 for calling the UtilityAnalysis obj's underlying member method code with example usage: obj.test_w_public_partitions(noise_kind, expected_noise_std) without return types