code: def test_select_private_partitions_returns_sensible_result(self):
      with TestPipeline() as pipeline:
          # Arrange
          col = [(u, "pk1") for u in range(50)]
          col += [(50 + u, "pk2") for u in range(50)]
          pcol = pipeline | "Create produce" >> beam.Create(col)
          # Use very high epsilon and delta to minimize noise and test
          # flakiness.
          budget_accountant = budget_accounting.NaiveBudgetAccountant(
              total_epsilon=800, total_delta=0.999, num_aggregations=1
          )
          private_collection = (
              pcol
              | "Create private collection"
              >> private_beam.MakePrivate(
                  budget_accountant=budget_accountant,
                  privacy_id_extractor=lambda x: x[0],
              )
          )
  
          select_partitions_params = (
              aggregate_params.SelectPartitionsParams(
                  max_partitions_contributed=2
              )
          )
          partition_extractor = lambda x: x[1]
  
          # Act
          result = private_collection | private_beam.SelectPartitions(
              select_partitions_params=select_partitions_params,
              partition_extractor=partition_extractor,
              label="Test select partitions",
          )
          budget_accountant.compute_budgets()
  
          # Assert
          # This is a health check to validate that the result is sensible.
          # Hence, we use a very large tolerance to reduce test flakiness.
          beam_util.assert_that(
              result, beam_util.equal_to(["pk1", "pk2"])
          )
  
imports: import unittest
  import apache_beam
  from apache_beam.runners.portability import fn_api_runner
  from apache_beam import pvalue
  from unittest.mock import patch
  import apache_beam.testing.util
  from apache_beam.testing.test_pipeline import TestPipeline
  import pipeline_dp
  from pipeline_dp import private_beam
  from pipeline_dp import aggregate_params, budget_accounting
label_desc: Use image node_id 26 for calling the PrivateBeamTest obj's underlying member method code with example usage: obj.test_select_private_partitions_returns_sensible_result() without return types