code: def postprocessor(self):
      def _set_attr_if_not_exists(pp_cfg, attr_name, default=None):
          if attr_name not in pp_cfg:
              attr_val = getattr(self.val_dataset, attr_name, default)
              logger.info(
                  f"Will use `{attr_name}={attr_val}` for postprocessing."
              )
              pp_cfg[attr_name] = attr_val
  
      pp_cfg = self.config.postprocessor_cfg
      if pp_cfg == {}:
          raise RuntimeError(
              "No `postprocessor` is specified in the configuration file."
          )
      _set_attr_if_not_exists(pp_cfg, "num_classes", 1)
      _set_attr_if_not_exists(pp_cfg, "thing_ids", [])
      _set_attr_if_not_exists(pp_cfg, "label_divisor", 1000)
      _set_attr_if_not_exists(pp_cfg, "ignore_index", 255)
      postprocessor = self.build_component(pp_cfg)
      return postprocessor
  
file_path: PaddleSeg/contrib/PanopticSeg/paddlepanseg/cvlibs/config.py
imports: import paddleseg
  from paddleseg.cvlibs import builder
  from paddleseg.utils import logger
  from paddleseg.utils.utils import CachedProperty
  from .None import manager
label_desc: Use image node_id 2 for calling the PanSegBuilder obj's underlying member method code with example usage: obj.postprocessor() and returns: postprocessor