code: def test_inference_with_pretrained_model(
      model_store, test_file, torchserve
  ):
      model_name = "scriptable_tokenizer"
  
      params = (
          ("model_name", model_name),
          (
              "url",
              "https://bert-mar-file.s3.us-west-2.amazonaws.com/text_classification_with_scriptable_tokenizer/scriptable_tokenizer.mar",
          ),
          ("initial_workers", "1"),
      )
  
      test_utils.reg_resp = test_utils.register_model_with_params(
          params
      )
  
      # Give test some time for model to be downloaded from S3 bucket
      for sleep_time in [2, 4, 8, 16, 32, 64]:
          with open(test_file, "rb") as f:
              response = requests.post(
                  url=f"http://localhost:8080/predictions/{model_name}",
                  data=f,
              )
          if response.status_code == 200:
              break
          time.sleep(sleep_time)
  
      assert response.status_code == 200
  
      result_entries = json.loads(response.text)
  
      assert "Negative" in result_entries
      assert "Positive" in result_entries
  
      assert float(result_entries["Negative"]) == pytest.approx(
          0.0001851904089562595, abs=1e-6
      )
      assert float(result_entries["Positive"]) == pytest.approx(
          0.9998148083686829, abs=1e-6
      )
  
      test_utils.unregister_model(model_name)
  
imports: import importlib
  import json
  import os
  import shutil
  import sys
  import time
  from argparse import Namespace
  from pathlib import Path
  import pytest
  import requests
  import test_utils
  import torch
  from model_archiver import ModelArchiverConfig
  from test_utils import REPO_ROOT
  from ts.torch_handler.unit_tests.test_utils.mock_context import MockContext
label_desc: Use image node_id 11 for calling a global function with example usage: test_inference_with_pretrained_model(model_store, test_file, torchserve) without return types