code: def __init__(
      self,
      mode,
      dataset_root,
      transforms,
      file_list,
      label_divisor=None,
      thing_ids=None,
      num_classes=None,
      ignore_index=None,
      separator=" ",
      no_collation_keys=None,
  ):
      super().__init__()
      mode = mode.lower()
      if mode not in ("train", "val"):
          raise ValueError(
              "mode should be 'train' or 'val' , but got {}.".format(
                  mode
              )
          )
      self.mode = mode
      self.dataset_root = dataset_root
      self.transforms = Compose(transforms)
      self.file_list = file_list
      self.num_classes = (
          num_classes if num_classes is not None else self.NUM_CLASSES
      )
      self.ignore_index = (
          ignore_index
          if ignore_index is not None
          else self.IGNORE_INDEX
      )
      self.label_divisor = (
          label_divisor
          if label_divisor is not None
          else self.LABEL_DIVISOR
      )
      self.thing_ids = thing_ids
      self.sep = separator
      self.no_collation_keys = set(self.NO_COLLATION_KEYS)
      if no_collation_keys is not None:
          self.no_collation_keys |= set(no_collation_keys)
      self.sample_list = self._read_sample_list()
  
imports: import json
  import copy
  import os
  import numpy
  import paddle
  from paddleseg.transforms import Compose
  from paddlepanseg.cvlibs import build_info_dict
label_desc: Use image node_id 1 to create a new PanopticDataset object from inherited base classes: paddle.io with example: obj = PanopticDataset(mode, dataset_root, transforms, file_list, label_divisor, thing_ids, num_classes, ignore_index, separator, no_collation_keys)