code: def test_tp_inference(model_name):
      """
      Full circle test with torchserve
      """
  
      model_name, pipe = model_name
  
      response = requests.post(
          url=f"http://localhost:8080/predictions/{model_name}",
          data=json.dumps(42),
      )
      assert response.status_code == 500
  
      logs = []
      for _ in range(100):
          logs.append(pipe.get())
          if (
              "Auto recovery succeeded, reset recoveryStartTS"
              in logs[-1]
          ):
              break
  
      assert any("Model initialization ... DONE" in l for l in logs)
      assert any(
          "Number or consecutive unsuccessful inference 1" in l
          for l in logs
      )
      assert any("Worker disconnected" in l for l in logs)
      assert any("Retry worker" in l for l in logs)
      assert any("Auto recovery start timestamp" in l for l in logs)
      assert not any("Auto recovery failed again" in l for l in logs)
  
file_path: serve/test/pytest/test_auto_recover.py
imports: import json
  import platform
  import shutil
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  import requests
  import test_utils
  from model_archiver import ModelArchiverConfig
label_desc: Use image node_id 6 for calling a global function with example usage: test_tp_inference(model_name) without return types