code: def test_management_apis():
      api_mapping = {
          "register": "RegisterModel",
          "unregister": "UnregisterModel",
          "scale": "ScaleWorker",
          "set_default": "SetDefault",
          "list": "ListModels",
          "describe": "DescribeModel",
      }
  
      with open(
          os.path.join(os.path.dirname(__file__), management_data_json),
          "rb",
      ) as f:
          test_data = json.loads(f.read())
  
      for item in test_data:
          try:
              api_name = item["type"]
              api = globals()["__get_" + api_name + "_params"]
              params = api(parse.urlsplit(item["path"]))
              test_gRPC_utils.run_management_api(
                  api_mapping[api_name], **params
              )
          except grpc.RpcError as e:
              if "grpc_status_code" in item:
                  assert e.code().value[0] == item["grpc_status_code"]
          except ValueError as e:
              # gRPC has more stricter check on the input types hence ignoring the test case from data file
              continue
  
file_path: serve/test/pytest/test_gRPC_management_apis.py
imports: import grpc
  import json
  import os
  import test_gRPC_utils
  import test_utils
  from urllib import parse
label_desc: Use image node_id 13 for calling a global function with example usage: test_management_apis() without return types