code: def test_contribution_bounding_per_partition_bounding_applied(self):
      input = [
          ("pid1", "pk1", 1),
          ("pid1", "pk1", 2),
          ("pid1", "pk2", 3),
          ("pid1", "pk2", 4),
          ("pid1", "pk2", 5),
          ("pid2", "pk2", 6),
      ]
      max_partitions_contributed, max_contributions_per_partition = 5, 2
      bound_result = self._run_contribution_bounding(
          input,
          max_partitions_contributed,
          max_contributions_per_partition,
      )
  
      self.assertEqual(3, len(bound_result))
      # Check contribution limits per-partition are enforced.
      self.assertTrue(
          all(
              map(
                  lambda op_val: op_val[1][0]
                  <= max_contributions_per_partition,
                  bound_result,
              )
          )
      )
  
file_path: pipelinedp/tests/contribution_bounders_test.py
imports: import collections
  import numpy
  from absl.testing import parameterized
  import pipeline_dp
  import pipeline_dp.contribution_bounders
label_desc: Use image node_id 4 for calling the SamplingCrossAndPerPartitionContributionBounderTest obj's underlying member method code with example usage: obj.test_contribution_bounding_per_partition_bounding_applied() without return types