code: def test_restart_torchserve_with_one_of_model_mar_removed():
      """Validates that torchserve will fail to start in the following scenario:
      1) We use a snapshot file to start torchserve. The snapshot contains reference to few model files
      2) One of these model mar files are accidentally deleted from the model store
      """
      # Register multiple models
      # 1st model
      test_utils.delete_model_store()
      test_utils.start_torchserve()
      requests.post("http://127.0.0.1:8081/models?url=densenet161.mar")
      time.sleep(15)
      # 2nd model
      requests.post("http://127.0.0.1:8081/models?url=mnist.mar")
      time.sleep(15)
      test_utils.stop_torchserve()
  
      # Start Torchserve
      test_utils.start_torchserve()
      response = requests.get("http://127.0.0.1:8081/models/")
      num_of_regd_models = len(json.loads(response.content)["models"])
      test_utils.stop_torchserve()
  
      # Now remove the registered model mar file (delete_mar_ fn)
      test_utils.delete_mar_file_from_model_store(
          model_store=os.path.join(test_utils.ROOT_DIR, "model_store"),
          model_mar="densenet",
      )
  
      # Start Torchserve with existing snapshot file containing reference to one of the model mar file
      # which is now missing from the model store
      snapshot_cfg = glob.glob("logs/config/*snap*.cfg")[1]
      test_utils.start_torchserve(
          snapshot_file=snapshot_cfg, gen_mar=False
      )
      try:
          response = requests.get("http://127.0.0.1:8081/models/")
      except:
          assert (
              True
          ), "Failed to start Torchserve as one of reqd model mar file is missing"
      else:
          assert False, (
              "Something is not right!! Started Torchserve successfully with a "
              "reqd model mar file missing from the model store!!"
          )
      finally:
          test_utils.torchserve_cleanup()
  
imports: import platform
  import time
  import os
  import glob
  import requests
  import json
  import test_utils
label_desc: Use image node_id 16 for calling a global function with example usage: test_restart_torchserve_with_one_of_model_mar_removed() without return types