code: def test_post_process_panoptic_segmentation(self):
      feature_extractor = self.feature_extraction_class(
          num_labels=self.feature_extract_tester.num_classes
      )
      outputs = (
          self.feature_extract_tester.get_fake_maskformer_outputs()
      )
      segmentation = (
          feature_extractor.post_process_panoptic_segmentation(
              outputs, threshold=0
          )
      )
  
      self.assertTrue(
          len(segmentation) == self.feature_extract_tester.batch_size
      )
      for el in segmentation:
          self.assertTrue("segmentation" in el)
          self.assertTrue("segments_info" in el)
          self.assertEqual(type(el["segments_info"]), list)
          self.assertEqual(
              el["segmentation"].shape,
              (
                  self.feature_extract_tester.height,
                  self.feature_extract_tester.width,
              ),
          )
  
imports: import unittest
  import numpy
  from transformers.testing_utils import require_torch, require_vision
  from transformers.utils import is_torch_available, is_vision_available
  from ...test_feature_extraction_common import FeatureExtractionSavingTestMixin, prepare_image_inputs
label_desc: Use image node_id 16 for calling the MaskFormerFeatureExtractionTest obj's underlying member method code with example usage: obj.test_post_process_panoptic_segmentation() without return types