code: def test_driver_logging_failure(
      self,
      mock_log_call,
      error_log_call,
      mock_get_namespaced_crd,
      mock_kube_conn,
      soft_fail: bool,
      expected_exception: AirflowException,
  ):
      sensor = SparkKubernetesSensor(
          application_name="spark_pi",
          attach_log=True,
          dag=self.dag,
          task_id="test_task_id",
          soft_fail=soft_fail,
      )
      with pytest.raises(expected_exception):
          sensor.poke({})
      mock_log_call.assert_called_once_with(
          "spark-pi-driver",
          namespace="default",
          container="spark-kubernetes-driver",
      )
      error_log_call.assert_called_once_with(TEST_POD_LOG_RESULT)
  
imports: from __future__ import annotations
  import json
  from unittest.mock import patch
  import pytest
  from kubernetes.client.rest import ApiException
  from airflow import DAG
  from airflow.exceptions import AirflowException, AirflowSkipException
  from airflow.models import Connection
  from airflow.providers.cncf.kubernetes.sensors.spark_kubernetes import SparkKubernetesSensor
  from airflow.utils import db, timezone
label_desc: Use image node_id 14 for calling the TestSparkKubernetesSensor obj's underlying member method code with example usage: obj.test_driver_logging_failure(mock_log_call, error_log_call, mock_get_namespaced_crd, mock_kube_conn, soft_fail, expected_exception) without return types