code: def http_json_to_ndarray(json_str):
      # currently there is no http user use batch predict, so batch is not implemented here
      # to add batch predict, replace 0 index to [0, batch_size)
      res_dict = json.loads(
          json.loads(json.loads(json_str)["predictions"][0])["value"]
      )
      data, shape = res_dict["data"], res_dict["shape"]
      array = np.array(data)
      array = array.reshape(shape)
      return array
  
imports: import redis
  import time
  from bigdl.serving.schema import *
  import httpx
  import json
  import uuid
  from bigdl.serving.log4Error import invalidInputError
label_desc: Use image node_id 1 for calling a global function with example usage: http_json_to_ndarray(json_str) and returns: array