code: def main():
      parser = argparse.ArgumentParser()
      parser.add_argument(
          "--dataset", choices=("cityscapes", "ade20k", "camvid", "voc")
      )
      parser.add_argument("--model", choices=sorted(models.keys()))
      parser.add_argument("--gpu", type=int, default=-1)
      parser.add_argument("--pretrained-model")
      parser.add_argument("--batchsize", type=int)
      parser.add_argument("--input-size", type=int, default=None)
      args = parser.parse_args()
  
      dataset, eval_, model, batchsize = setup(
          args.dataset,
          args.model,
          args.pretrained_model,
          args.batchsize,
          args.input_size,
      )
  
      if args.gpu >= 0:
          chainer.cuda.get_device_from_id(args.gpu).use()
          model.to_gpu()
  
      iterator = iterators.SerialIterator(
          dataset, batchsize, repeat=False, shuffle=False
      )
  
      in_values, out_values, rest_values = apply_to_iterator(
          model.predict, iterator, hook=ProgressHook(len(dataset))
      )
      # Delete an iterator of images to save memory usage.
      del in_values
  
      eval_(out_values, rest_values)
  
imports: import argparse
  import chainer
  from chainer import iterators
  from chainercv.datasets import ade20k_semantic_segmentation_label_names
  from chainercv.datasets import ADE20KSemanticSegmentationDataset
  from chainercv.datasets import camvid_label_names
  from chainercv.datasets import CamVidDataset
  from chainercv.datasets import cityscapes_semantic_segmentation_label_names
  from chainercv.datasets import CityscapesSemanticSegmentationDataset
  from chainercv.datasets import voc_semantic_segmentation_label_names
  from chainercv.datasets import VOCSemanticSegmentationDataset
  from chainercv.evaluations import eval_semantic_segmentation
  from chainercv.experimental.links import PSPNetResNet101
  from chainercv.experimental.links import PSPNetResNet50
  from chainercv.links import DeepLabV3plusXception65
  from chainercv.links import SegNetBasic
  from chainercv.utils import apply_to_iterator
  from chainercv.utils import ProgressHook
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types