code: def test_workflow_sanity():
      current_path = os.getcwd()
      ts_log_file = os.path.join("logs", "ts_console.log")
      os.makedirs("model_store", exist_ok=True)
      os.makedirs("logs", exist_ok=True)
  
      started = ts.start_torchserve(
          ncs=True,
          log_file=ts_log_file,
          model_store="model_store",
          workflow_store="model_store",
      )
      if not started:
          sys.exit(1)
  
      # Register workflow
      response = ts.register_workflow("densenet_wf")
      if response and response.status_code == 200:
          print(response.text)
      else:
          print(f"## Failed to register workflow")
          sys.exit(1)
  
      # Run prediction on workflow
      response = ts.workflow_prediction(
          "densenet", "examples/image_classifier/kitten.jpg"
      )
      if response and response.status_code == 200:
          print(response.text)
      else:
          print(
              f"## Failed to run inference on workflow - {response.text}"
          )
          sys.exit(1)
  
      response = ts.unregister_workflow("densenet")
      if response and response.status_code == 200:
          print(response.text)
      else:
          print(f"## Failed to unregister workflow")
          sys.exit(1)
  
      stopped = ts.stop_torchserve()
      if not stopped:
          sys.exit(1)
  
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 8 for calling a global function with example usage: test_workflow_sanity() without return types