code: def test_aggregate_private_partitions_selection(
      self,
      min_users: int,
      strategy: pipeline_dp.PartitionSelectionStrategy,
      pre_threshold: Optional[int],
  ):
      input = [(f"privacy_id{i}", "partition") for i in range(10)]
      extractors = pipeline_dp.DataExtractors(
          privacy_id_extractor=lambda x: x[0],
          partition_extractor=lambda x: x[1],
          value_extractor=lambda x: 0,
      )
  
      params, _ = self._create_params_default()
      params.metrics = [pipeline_dp.Metrics.COUNT]
      # Set partition selection strategy and pre-threshold.
      params.partition_selection_strategy = strategy
      params.pre_threshold = pre_threshold
  
      # epsilon, delta have an exact representation as float
      epsilon, delta = 2, 1 / 1024
  
      engine = self._create_dp_engine_default(
          epsilon=epsilon, delta=delta
      )
      expected_len = 0 if 10 < min_users else 1
  
      with patch(
          "pipeline_dp.partition_selection"
          ".create_partition_selection_strategy",
          return_value=MockPartitionStrategy(min_users),
      ) as mock_method:
          output = engine.aggregate(input, params, extractors)
          engine._budget_accountant.compute_budgets()
          output = list(output)  # trigger computation
          self.assertLen(output, expected_len)
          mock_method.assert_called_once_with(
              strategy, epsilon / 2, delta / 2, 1, pre_threshold
          )
  
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 21 for calling the DpEngineTest obj's underlying member method code with example usage: obj.test_aggregate_private_partitions_selection(min_users, strategy, pre_threshold) without return types