code: def test_poke_on_invalid_state(
      self, mock_get_job_description, batch_sensor: BatchSensor
  ):
      mock_get_job_description.return_value = {"status": "INVALID"}
      with pytest.raises(
          AirflowException,
          match="Batch sensor failed. Unknown AWS Batch job status: INVALID",
      ):
          batch_sensor.poke({})
  
      mock_get_job_description.assert_called_once_with(JOB_ID)
  
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from airflow.exceptions import AirflowException, AirflowSkipException, TaskDeferred
  from airflow.providers.amazon.aws.hooks.batch_client import BatchClientHook
  from airflow.providers.amazon.aws.sensors.batch import BatchComputeEnvironmentSensor, BatchJobQueueSensor, BatchSensor
  from airflow.providers.amazon.aws.triggers.batch import BatchJobTrigger
label_desc: Use image node_id 3 for calling the TestBatchSensor obj's underlying member method code with example usage: obj.test_poke_on_invalid_state(mock_get_job_description, batch_sensor) without return types