code: def test_integ_history_server_with_expected_failure(
      spark_py_processor,
  ):
      with TestCase.assertLogs("sagemaker", level="ERROR") as cm:
          spark_py_processor.start_history_server(
              spark_event_logs_s3_uri="invalids3uri"
          )
      response = _request_with_retry(
          HISTORY_SERVER_ENDPOINT, max_retries=5
      )
      assert response is None
      assert (
          "History server failed to start. Please run 'docker logs history_server' to see logs"
          in cm.output[0]
      )
  
imports: from __future__ import absolute_import
  import re
  import os
  import subprocess
  import time
  import urllib3
  from datetime import datetime
  from urllib3.util.retry import Retry
  import boto3
  import pytest
  from sagemaker.s3 import S3Downloader, S3Uploader
  from sagemaker.spark.processing import PySparkProcessor, SparkJarProcessor
  from tests.integ import DATA_DIR
  from unittest.case import TestCase
label_desc: Use image node_id 12 for calling a global function with example usage: test_integ_history_server_with_expected_failure(spark_py_processor) without return types