code: def test_history_server_run(
      mock_subprocess_popen, mock_get_run_history_server_cmd, mock_down
  ):
      mock_get_run_history_server_cmd.return_value = (
          "docker run --env AWS_ACCESS_KEY_ID=123 "
          "--name history_server --network host --entrypoint "
          "smspark-history-server image_uri"
      )
      history_server = _HistoryServer({}, "image_uri", "--network host")
  
      history_server.run()
  
      mock_down.assert_called_once()
      mock_subprocess_popen.assert_called_with(
          [
              "docker",
              "run",
              "--env",
              "AWS_ACCESS_KEY_ID=123",
              "--name",
              "history_server",
              "--network",
              "host",
              "--entrypoint",
              "smspark-history-server",
              "image_uri",
          ],
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
      )
  
imports: from __future__ import absolute_import
  import pathlib
  import subprocess
  import tempfile
  from io import BytesIO
  from typing import Generator
  from unittest.case import TestCase
  from unittest.mock import MagicMock, Mock, call, mock_open, patch
  import pytest
  from sagemaker.processing import ProcessingInput, ProcessingOutput
  from sagemaker.session_settings import SessionSettings
  from sagemaker.spark.processing import PySparkProcessor, SparkJarProcessor, _SparkProcessorBase, _HistoryServer, FileType, SparkConfigUtils
label_desc: Use image node_id 33 for calling a global function with example usage: test_history_server_run(mock_subprocess_popen, mock_get_run_history_server_cmd, mock_down) without return types