code: def register_model(mar_file_path, model_store, torchserve):
      """
      Register the model in torchserve
      """
      shutil.copy(mar_file_path, model_store)
  
      file_name = Path(mar_file_path).name
  
      model_name = Path(file_name).stem
  
      params = (
          ("model_name", model_name),
          ("url", file_name),
          ("initial_workers", "1"),
          ("synchronous", "true"),
          ("batch_size", "32"),
      )
  
      test_utils.reg_resp = test_utils.register_model_with_params(
          params
      )
  
      yield model_name
  
      test_utils.unregister_model(model_name)
  
imports: import asyncio
  import json
  import random
  import shutil
  from pathlib import Path
  from unittest.mock import patch
  from zipfile import ZIP_STORED, ZipFile
  import pytest
  import requests
  import test_utils
  import yaml
  from model_archiver import ModelArchiverConfig
  from torchvision.models.resnet import ResNet18_Weights
  from ts.torch_handler.unit_tests.test_utils.model_dir import download_model
label_desc: Use image node_id 9 for calling a global function with example usage: register_model(mar_file_path, model_store, torchserve) without return types