code: def test_poke_message_filtering_jsonpath(
      self, mocked_client, mocked_context
  ):
      matching = [
          {"id": 11, "key": {"matches": [1, 2]}},
          {"id": 12, "key": {"matches": [3, 4, 5]}},
          {"id": 13, "key": {"matches": [10]}},
      ]
      non_matching = [
          {"id": 14, "key": {"nope": [5, 6]}},
          {"id": 15, "key": {"nope": [7, 8]}},
      ]
  
      def mock_receive_message(**kwargs):
          messages = []
          for message in [*matching, *non_matching]:
              messages.append(
                  {
                      "MessageId": message["id"],
                      "ReceiptHandle": 100 + message["id"],
                      "Body": json.dumps(message),
                  }
              )
          return {"Messages": messages}
  
      mocked_client.return_value.receive_message.side_effect = (
          mock_receive_message
      )
  
      def mock_delete_message_batch(**kwargs):
          return {"Successful"}
  
      mocked_client.return_value.delete_message_batch.side_effect = (
          mock_delete_message_batch
      )
  
      # Test that messages are filtered
      sensor = SqsSensor(
          **self.default_op_kwargs,
          message_filtering="jsonpath",
          message_filtering_config="key.matches[*]",
      )
      assert sensor.poke(mocked_context)
  
      # Test that only filtered messages are deleted
      delete_entries = [
          {"Id": x["id"], "ReceiptHandle": 100 + x["id"]}
          for x in matching
      ]
      calls_delete_message_batch = [
          mock.call().delete_message_batch(
              QueueUrl=QUEUE_URL, Entries=delete_entries
          )
      ]
      mocked_client.assert_has_calls(calls_delete_message_batch)
  
imports: from __future__ import annotations
  import json
  from unittest import mock
  import pytest
  from moto import mock_sqs
  from airflow.exceptions import AirflowException, AirflowSkipException, TaskDeferred
  from airflow.providers.amazon.aws.hooks.sqs import SqsHook
  from airflow.providers.amazon.aws.sensors.sqs import SqsSensor
label_desc: Use image node_id 10 for calling the TestSqsSensor obj's underlying member method code with example usage: obj.test_poke_message_filtering_jsonpath(mocked_client, mocked_context) and returns: dict, unknown