code: def torchserve_sanity():
      try:
          # Test frontend gradle
          test_frontend()
  
          # Install from src
          install_from_src()
  
          # Generate mar files
          mg.generate_mars()
  
          # Test Torchserve pylint, pytest
          test_torchserve()
  
          # Test Model archiver pylint, pytest, IT
          test_modelarchiver()
  
          # Test Workflow archiver pylint, pytest, IT
          test_workflow_archiver()
  
          # Run Sanity Tests
          test_sanity()
  
          # Run workflow sanity
          test_workflow_sanity()
  
          # Check for broken links
          test_markdown_files()
  
      finally:
          cleanup()
  
file_path: serve/torchserve_sanity.py
imports: import ts_scripts.tsutils
  from ts_scripts import marsgen
  from ts_scripts.backend_utils import test_torchserve
  from ts_scripts.frontend_utils import test_frontend
  from ts_scripts.install_from_src import install_from_src
  from ts_scripts.modelarchiver_utils import test_modelarchiver
  from ts_scripts.sanity_utils import test_markdown_files, test_sanity, test_workflow_sanity
  from ts_scripts.shell_utils import rm_dir, rm_file
  from ts_scripts.workflow_archiver_utils import test_workflow_archiver
label_desc: Use image node_id 1 for calling a global function with example usage: torchserve_sanity() without return types