code: def test_stage_submit_deps(
      mock_s3_uploader, jar_file, config, expected, sagemaker_session
  ):
      spark_processor_type = {
          "py_spark_processor": PySparkProcessor,
          "spark_jar_processor": SparkJarProcessor,
      }[config["spark_processor_type"]]
      spark_processor = spark_processor_type(
          base_job_name="sm-spark",
          role="AmazonSageMaker-ExecutionRole",
          framework_version="2.4",
          instance_count=1,
          instance_type="ml.c5.xlarge",
          image_uri="790336243319.dkr.ecr.us-west-2.amazonaws.com/sagemaker-spark:0.1",
          dependency_location=config["dependency_location"],
          sagemaker_session=sagemaker_session,
      )
  
      submit_deps_dict = {
          None: None,
          "s3": "s3://bucket",
          "jar": jar_file,
          "file": "file://test",
          "other": "test://",
      }
      submit_deps = None
      if config["submit_deps"] is not None:
          submit_deps = [
              submit_deps_dict[submit_dep]
              for submit_dep in config["submit_deps"]
          ]
  
      if expected is ValueError:
          with pytest.raises(expected) as e:
              spark_processor._stage_submit_deps(
                  submit_deps, config["input_channel_name"]
              )
  
          assert isinstance(e.value, expected)
      else:
          input_channel, spark_opt = spark_processor._stage_submit_deps(
              submit_deps, config["input_channel_name"]
          )
  
          if expected[0] is None:
              assert input_channel is None
              assert spark_opt == expected[1]
          else:
              assert input_channel.source == expected[0]
              assert spark_opt == expected[1]
  
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 15 for calling a global function with example usage: test_stage_submit_deps(mock_s3_uploader, jar_file, config, expected, sagemaker_session) without return types