code: def reader(images=None, paths=None):
      """
      Preprocess to yield image.
  
      Args:
          images (list[numpy.ndarray]): images data, shape of each is [H, W, C].
          paths (list[str]): paths to images.
  
      Yield:
          each (collections.OrderedDict): info of original image, preprocessed image.
      """
      component = list()
      if paths:
          for im_path in paths:
              each = OrderedDict()
              assert os.path.isfile(
                  im_path
              ), "The {} isn't a valid file path.".format(im_path)
              each["org_im_path"] = im_path
              each["org_im"] = Image.open(im_path)
              each["org_im_width"], each["org_im_height"] = each[
                  "org_im"
              ].size
              component.append(each)
      if images is not None:
          assert type(images), "images is a list."
          for im in images:
              each = OrderedDict()
              each["org_im"] = Image.fromarray(im[:, :, ::-1])
              each["org_im_path"] = "ndarray_time={}".format(
                  round(time.time(), 6) * 1e6
              )
              each["org_im_width"], each["org_im_height"] = each[
                  "org_im"
              ].size
              component.append(each)
  
      for element in component:
          element["image"] = process_image(element["org_im"])
          yield element
  
file_path: PaddleHub/modules/image/classification/efficientnetb7_imagenet/data_feed.py
imports: import os
  import time
  from collections import OrderedDict
  import numpy
  from PIL import Image
label_desc: Use image node_id 4 for calling a global function with example usage: reader(images, paths) without return types