code: def stop_torchserve():
      print("## Stopping TorchServe")
      cmd = [f"{torchserve_command[platform.system()]}"]
      cmd.append("--stop")
      print(
          f"## In directory: {os.getcwd()} | Executing command: {cmd}"
      )
      p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=STDOUT)
  
      status = p.wait()
      if status == 0:
          print("## Successfully stopped TorchServe")
          return True
      else:
          print("## TorchServe failed to stop !")
          return False
  
imports: import os
  import platform
  import sys
  import threading
  from pathlib import Path
  from subprocess import PIPE, STDOUT, Popen
  import requests
  from ts_scripts import marsgen
label_desc: Use image node_id 2 for calling a global function with example usage: stop_torchserve() and returns: True, False