code: def test_boostrap_sample_combine_fn(self):
      metric_key = metric_types.MetricKey(name="metric")
      samples = [
          confidence_intervals_util.SampleMetrics(
              sample_id=0, metrics={metric_key: 0}
          ),
          confidence_intervals_util.SampleMetrics(
              sample_id=1, metrics={metric_key: 7}
          ),
          confidence_intervals_util.SampleMetrics(
              sample_id=poisson_bootstrap._FULL_SAMPLE_ID,
              metrics={metric_key: 4},
          ),
      ]
  
      with beam.Pipeline() as pipeline:
          result = (
              pipeline
              | "Create" >> beam.Create(samples, reshuffle=False)
              | "CombineSamples"
              >> beam.CombineGlobally(
                  poisson_bootstrap._BootstrapSampleCombineFn(
                      num_bootstrap_samples=2
                  )
              )
          )
  
          def check_result(got_pcoll):
              self.assertLen(got_pcoll, 1)
              metrics = got_pcoll[0]
  
              self.assertIn(metric_key, metrics)
              self.assertAlmostEqual(
                  metrics[metric_key].sample_mean, 3.5, delta=0.1
              )
              self.assertAlmostEqual(
                  metrics[metric_key].sample_standard_deviation,
                  4.94,
                  delta=0.1,
              )
              self.assertEqual(
                  metrics[metric_key].sample_degrees_of_freedom, 1
              )
              self.assertEqual(metrics[metric_key].unsampled_value, 4.0)
  
          util.assert_that(result, check_result)
  
file_path: model-analysis/tensorflow_model_analysis/evaluators/poisson_bootstrap_test.py
imports: from absl.testing import absltest
  import apache_beam
  from apache_beam.testing import util
  import numpy
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.evaluators import confidence_intervals_util
  from tensorflow_model_analysis.evaluators import poisson_bootstrap
  from tensorflow_model_analysis.metrics import binary_confusion_matrices
  from tensorflow_model_analysis.metrics import metric_types
label_desc: Use image node_id 2 for calling the PoissonBootstrapTest obj's underlying member method code with example usage: obj.test_boostrap_sample_combine_fn() without return types