code: def register_model(
      model_name, protocol="http", host="localhost", port="8081"
  ):
      print(f"## Registering {model_name} model")
      model_zoo_url = "https://torchserve.s3.amazonaws.com"
      marfile = f"{model_name}.mar"
      if marfile not in mg.mar_set:
          marfile = f"{model_zoo_url}/mar_files/{model_name}.mar"
  
      params = (
          ("model_name", model_name),
          ("url", marfile),
          ("initial_workers", "1"),
          ("synchronous", "true"),
      )
      url = f"{protocol}://{host}:{port}/models"
      response = requests.post(url, params=params, verify=False)
      return response
  
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 3 for calling a global function with example usage: register_model(model_name, protocol, host, port) and returns: response