code: def run_grpc_test(model: dict):
      model_name = model["name"]
      model_inputs = model["inputs"]
  
      # Run gRPC sanity
      print("pass mg.mar_set=", mg.mar_set)
      mar_set_list_str = [str(s) for s in mg.mar_set]
      mar_set_str = ",".join(mar_set_list_str)
      register_model_grpc_cmd = f"python ts_scripts/torchserve_grpc_client.py register {model_name} {mar_set_str}"
      status = os.system(register_model_grpc_cmd)
  
      if status != 0:
          print("## Failed to register model with torchserve")
          sys.exit(1)
      else:
          print(
              f"## Successfully registered {model_name} model with torchserve"
          )
  
      for input in model_inputs:
          infer_model_grpc_cmd = [
              "python",
              "ts_scripts/torchserve_grpc_client.py",
              "infer",
              f"{model_name}",
              f"{input}",
          ]
          p = subprocess.run(
              infer_model_grpc_cmd, capture_output=True, text=True
          )
          out = p.stdout.split("\n")
          print("\n".join(out[:50]))
          if len(out) > 50:
              print("<output clipped>")
  
          if p.returncode != 0:
              print(f"## Failed to run inference on {model_name} model")
              sys.exit(1)
          else:
              print(
                  f"## Successfully ran inference on {model_name} model."
              )
  
      unregister_model_grpc_cmd = f"python ts_scripts/torchserve_grpc_client.py unregister {model_name}"
      status = os.system(unregister_model_grpc_cmd)
  
      if status != 0:
          print(f"## Failed to unregister {model_name}")
          sys.exit(1)
      else:
          print(f"## Successfully unregistered {model_name}")
  
file_path: serve/ts_scripts/sanity_utils.py
imports: import glob
  import json
  import os
  import subprocess
  import sys
  from pathlib import Path
  import torch
  from ts_scripts import marsgen
  from ts_scripts import tsutils
  from ts_scripts import utils
  from ts_scripts.tsutils import generate_grpc_client_stubs
label_desc: Use image node_id 5 for calling a global function with example usage: run_grpc_test(model) without return types