code: def test_sensor_defer(self, mock_poke):
      self.sensor.deferrable = True
      mock_poke.return_value = False
      with pytest.raises(TaskDeferred) as e:
          self.sensor.execute(context=None)
      assert isinstance(
          e.value.trigger, EmrContainerTrigger
      ), f"{e.value.trigger} is not a EmrContainerTrigger"
  
file_path: airflow/tests/providers/amazon/aws/sensors/test_emr_containers.py
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from airflow.exceptions import AirflowException, TaskDeferred
  from airflow.providers.amazon.aws.hooks.emr import EmrContainerHook
  from airflow.providers.amazon.aws.sensors.emr import EmrContainerSensor
  from airflow.providers.amazon.aws.triggers.emr import EmrContainerTrigger
label_desc: Use image node_id 9 for calling the TestEmrContainerSensor obj's underlying member method code with example usage: obj.test_sensor_defer(mock_poke) without return types