code: def run(path):
      input_api = InputQueue()
      base_path = path
  
      if not base_path:
          raise EOFError("You have to set your image path")
      output_api = OutputQueue()
      output_api.dequeue()
      path = [
          os.path.join(base_path, "cat1.jpeg"),
          os.path.join(base_path, "dog1.jpeg"),
          os.path.join(base_path, "fish1.jpeg"),
      ]
      for p in path:
          if not p.endswith("jpeg"):
              continue
          img = cv2.imread(os.path.join(base_path, p))
          img = cv2.resize(img, (224, 224))
          data = cv2.imencode(".jpg", img)[1]
          img_encoded = base64.b64encode(data).decode("utf-8")
          input_api.enqueue(p, t={"b64": img_encoded})
  
      time.sleep(10)
  
      # get all result and dequeue
      result = output_api.dequeue()
      for k in result.keys():
          output = "image: " + k + ", classification-result:"
          tmp_list = json.loads(result[k])
          for record in range(len(tmp_list)):
              output += (
                  " class: "
                  + str(tmp_list[record][0])
                  + "'s prob: "
                  + str(tmp_list[record][1])
              )
          print(output)
  
file_path: analytics-zoo/docker/hyperzoo/image_classification_and_object_detection_quick_start.py
imports: from zoo.serving.client import InputQueue, OutputQueue
  import os
  import cv2
  import json
  import time
  from optparse import OptionParser
  import base64
label_desc: Use image node_id 1 for calling a global function with example usage: run(path) without return types