code: def test_retrieve_image_uri(py_spark_processor, config, expected):
      if expected is ValueError:
          with pytest.raises(expected):
              py_spark_processor._retrieve_image_uri(
                  config["image_uri"],
                  config["framework_version"],
                  config["py_version"],
                  config["container_version"],
                  "us-west-2",
                  config["instance_type"],
              )
      else:
          assert expected == py_spark_processor._retrieve_image_uri(
              config["image_uri"],
              config["framework_version"],
              config["py_version"],
              config["container_version"],
              "us-west-2",
              config["instance_type"],
          )
  
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 16 for calling a global function with example usage: test_retrieve_image_uri(py_spark_processor, config, expected) without return types