code: def test_aggregate_private_partition_selection_keep_everything(self):
      # Arrange
      aggregator_params = pipeline_dp.AggregateParams(
          noise_kind=pipeline_dp.NoiseKind.GAUSSIAN,
          metrics=[agg.Metrics.COUNT],
          max_partitions_contributed=1,
          max_contributions_per_partition=1,
      )
      # Set a large budget for having the small noise and keeping all
      # partition keys.
      budget_accountant = NaiveBudgetAccountant(
          total_epsilon=100000, total_delta=1e-10
      )
  
      col = list(range(10)) + list(range(100, 120))
      data_extractor = pipeline_dp.DataExtractors(
          privacy_id_extractor=lambda x: x,
          partition_extractor=lambda x: f"pk{x // 100}",
          value_extractor=lambda x: None,
      )
  
      engine = pipeline_dp.DPEngine(
          budget_accountant=budget_accountant,
          backend=pipeline_dp.LocalBackend(),
      )
  
      col = engine.aggregate(
          col=col,
          params=aggregator_params,
          data_extractors=data_extractor,
      )
      budget_accountant.compute_budgets()
  
      col = list(col)
  
      # Assert
      approximate_expected = {"pk0": 10, "pk1": 20}
      self.assertEqual(2, len(col))  # all partition keys are kept.
      for pk, metrics_tuple in col:
          dp_count = metrics_tuple.count
          self.assertAlmostEqual(
              approximate_expected[pk], dp_count, delta=1e-3
          )
  
imports: import sys
  import unittest
  from typing import List, Optional, Tuple
  from unittest.mock import patch
  import numpy
  import apache_beam
  import apache_beam.testing.test_pipeline
  import apache_beam.testing.util
  import pydp.algorithms.partition_selection
  from absl.testing import absltest
  from absl.testing import parameterized
  import pipeline_dp
  from pipeline_dp import aggregate_params
  from pipeline_dp import budget_accounting
  from pipeline_dp import dp_computations
  from pipeline_dp.budget_accounting import NaiveBudgetAccountant
  from pipeline_dp.pipeline_backend import PipelineBackend
  from pipeline_dp.pipeline_functions import collect_to_container
  from pipeline_dp.report_generator import ReportGenerator
label_desc: Use image node_id 22 for calling the DpEngineTest obj's underlying member method code with example usage: obj.test_aggregate_private_partition_selection_keep_everything() without return types