code: def test_build_spark_submit_command(self, mock_get_env):
      # Given
      hook = SparkSubmitHook(**self._config)
  
      # When
      cmd = hook._build_spark_submit_command(self._spark_job_file)
  
      # Then
      expected_build_cmd = [
          "spark-submit",
          "--master",
          "yarn",
          "--conf",
          "parquet.compression=SNAPPY",
          "--files",
          "hive-site.xml",
          "--py-files",
          "sample_library.py",
          "--archives",
          "sample_archive.zip#SAMPLE",
          "--jars",
          "parquet.jar",
          "--packages",
          "com.databricks:spark-avro_2.11:3.2.0",
          "--exclude-packages",
          "org.bad.dependency:1.0.0",
          "--repositories",
          "http://myrepo.org",
          "--num-executors",
          "10",
          "--total-executor-cores",
          "4",
          "--executor-cores",
          "4",
          "--executor-memory",
          "22g",
          "--driver-memory",
          "3g",
          "--keytab",
          "privileged_user.keytab",
          "--principal",
          "user/spark@airflow.org",
          "--conf",
          "spark.kerberos.renewal.credentials=ccache",
          "--proxy-user",
          "sample_user",
          "--name",
          "spark-job",
          "--class",
          "com.foo.bar.AppMain",
          "--verbose",
          "test_application.py",
          "-f",
          "foo",
          "--bar",
          "bar",
          "--with-spaces",
          "args should keep embedded spaces",
          "baz",
      ]
      assert expected_build_cmd == cmd
      mock_get_env.assert_called_with("KRB5CCNAME")
  
imports: from __future__ import annotations
  import os
  from io import StringIO
  from unittest.mock import call, patch
  import pytest
  from airflow.exceptions import AirflowException
  from airflow.models import Connection
  from airflow.providers.apache.spark.hooks.spark_submit import SparkSubmitHook
  from airflow.utils import db
label_desc: Use image node_id 3 for calling the TestSparkSubmitHook obj's underlying member method code with example usage: obj.test_build_spark_submit_command(mock_get_env) without return types