code: def reader_wrapper(reader, input_name):
      if isinstance(input_name, list) and len(input_name) == 1:
          input_name = input_name[0]
  
      def gen():
          for i, data in enumerate(reader()):
              imgs = np.array(data["img"])
              yield {input_name: imgs}
  
      return gen
  
file_path: PaddleSeg/deploy/slim/act/run_seg.py
imports: import os
  import argparse
  import random
  import paddle
  import numpy
  from paddleseg.cvlibs import Config
  from paddleseg.cvlibs import SegBuilder
  from paddleseg.utils import worker_init_fn, metrics
  from paddleseg.core.infer import reverse_transform
  from paddleslim.auto_compression import AutoCompression
  from paddleslim.common import load_config
  from paddleslim.common.dataloader import get_feed_vars
label_desc: Use image node_id 3 for calling a global function with example usage: reader_wrapper(reader, input_name) and returns: gen