code: def test_inference_stream_apis():
      with open(
          os.path.join(
              os.path.dirname(__file__), inference_stream_data_json
          ),
          "rb",
      ) as f:
          test_data = json.loads(f.read())
  
      for item in test_data:
          if item["url"].startswith("{{mar_path_"):
              path = test_utils.mar_file_table[item["url"][2:-2]]
          else:
              path = item["url"]
  
          managment_stub = test_gRPC_utils.get_management_stub()
          response = managment_stub.RegisterModel(
              management_pb2.RegisterModelRequest(
                  url=path,
                  initial_workers=item["worker"],
                  synchronous=bool(item["synchronous"]),
                  model_name=item["model_name"],
              )
          )
  
          print(response.msg)
  
          model_input = os.path.join(
              os.path.dirname(__file__), "..", item["file"]
          )
          prediction = __infer_stream(
              test_gRPC_utils.get_inference_stub(),
              item["model_name"],
              model_input,
          )
  
          print("Stream prediction is : ", str(prediction))
  
          if "expected" in item:
              assert str(prediction) == str(item["expected"])
  
          response = managment_stub.UnregisterModel(
              management_pb2.UnregisterModelRequest(
                  model_name=item["model_name"],
              )
          )
  
          print(response.msg)
  
file_path: serve/test/pytest/test_gRPC_inference_api.py
imports: import json
  import os
  import threading
  from ast import literal_eval
  import inference_pb2
  import management_pb2
  import test_gRPC_utils
  import test_utils
label_desc: Use image node_id 7 for calling a global function with example usage: test_inference_stream_apis() without return types