code: def test_async_predict_call_with_data_and_input_path():
      sagemaker_session = empty_sagemaker_session()
      predictor_async = AsyncPredictor(
          Predictor(ENDPOINT, sagemaker_session)
      )
      predictor_async.name = ASYNC_PREDICTOR
      data = DUMMY_DATA
  
      result = predictor_async.predict_async(
          data=data, input_path=ASYNC_INPUT_LOCATION
      )
      assert sagemaker_session.s3_client.put_object.called
  
      assert (
          sagemaker_session.sagemaker_runtime_client.invoke_endpoint_async.called
      )
      assert (
          sagemaker_session.sagemaker_client.describe_endpoint.not_called
      )
      assert (
          sagemaker_session.sagemaker_client.describe_endpoint_config.not_called
      )
  
      expected_request_args = {
          "Accept": DEFAULT_ACCEPT,
          "InputLocation": ASYNC_INPUT_LOCATION,
          "EndpointName": ENDPOINT,
      }
  
      (
          call_args,
          kwargs,
      ) = (
          sagemaker_session.sagemaker_runtime_client.invoke_endpoint_async.call_args
      )
      assert kwargs == expected_request_args
      assert result.output_path == ASYNC_OUTPUT_LOCATION
      assert result.failure_path == ASYNC_FAILURE_LOCATION
  
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock
  from sagemaker.async_inference.waiter_config import WaiterConfig
  from sagemaker.predictor import Predictor
  from sagemaker.predictor_async import AsyncPredictor
  from sagemaker.exceptions import AsyncInferenceModelError, PollingTimeoutError
label_desc: Use image node_id 6 for calling a global function with example usage: test_async_predict_call_with_data_and_input_path() without return types