code: def _parse_reader(reader_cfg, dataset_cfg, metric, arch, image_shape):
      preprocess_list = []
      label_list = []
      if arch != "lane_arch":
          anno_file = dataset_cfg.get_anno()
  
          clsid2catid, catid2name = get_categories(
              metric, anno_file, arch
          )
  
          label_list = [str(cat) for cat in catid2name.values()]
  
      fuse_normalize = reader_cfg.get("fuse_normalize", False)
      sample_transforms = reader_cfg["sample_transforms"]
      for st in sample_transforms[1:]:
          for key, value in st.items():
              p = {"type": key}
              if key == "Resize":
                  if int(image_shape[1]) != -1:
                      value["target_size"] = image_shape[1:]
                  value["interp"] = value.get(
                      "interp", 1
                  )  # cv2.INTER_LINEAR
              if fuse_normalize and key == "NormalizeImage":
                  continue
              p.update(value)
              preprocess_list.append(p)
      batch_transforms = reader_cfg.get("batch_transforms", None)
      if batch_transforms:
          for bt in batch_transforms:
              for key, value in bt.items():
                  # for deploy/infer, use PadStride(stride) instead PadBatch(pad_to_stride)
                  if key == "PadBatch":
                      preprocess_list.append(
                          {
                              "type": "PadStride",
                              "stride": value["pad_to_stride"],
                          }
                      )
                      break
                  elif key == "CULaneResize":
                      # cut and resize
                      p = {"type": key}
                      p.update(value)
                      p.update({"cut_height": dataset_cfg.cut_height})
                      preprocess_list.append(p)
                      break
  
      return preprocess_list, label_list
  
file_path: PaddleDetection/ppdet/engine/export_utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import yaml
  from collections import OrderedDict
  import paddle
  from ppdet.data.source.category import get_categories
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 3 for calling a global function with example usage: _parse_reader(reader_cfg, dataset_cfg, metric, arch, image_shape) and returns: preprocess_list,  label_list