code: def main(args):
      assert (
          args.config is not None
      ), "No configuration file specified, please set --config"
      cfg = Config(args.config)
      builder = CPSBuilder(cfg)
      test_config = merge_test_config(cfg, args)
  
      utils.show_env_info()
      utils.show_cfg_info(cfg)
      utils.set_device(args.device)
  
      model = builder.model
      transforms = Compose(builder.val_transforms)
      image_list, image_dir = get_image_list(args.image_path)
      logger.info("The number of images: {}".format(len(image_list)))
  
      predict(
          model,
          model_path=args.model_path,
          transforms=transforms,
          image_list=image_list,
          image_dir=image_dir,
          save_dir=args.save_dir,
          **test_config,
      )
  
file_path: PaddleSeg/contrib/CrossPseudoSupervision/predict.py
imports: import argparse
  import os
  import paddle
  import datasets
  import models
  from cvlibs import Config, CPSBuilder
  from paddleseg.utils import get_sys_env, logger, get_image_list, utils
  from paddleseg.core import predict
  from paddleseg.transforms import Compose
label_desc: Use image node_id 3 for calling a global function with example usage: main(args) without return types