code: def test_to_request_dict():
      async_inference_config = AsyncInferenceConfig(
          output_path=S3_OUTPUT_PATH, failure_path=S3_FAILURE_PATH
      )
      assert (
          async_inference_config._to_request_dict()
          == DEFAULT_ASYNC_INFERENCE_DICT
      )
  
      async_inference_config_with_optional = AsyncInferenceConfig(
          output_path=S3_OUTPUT_PATH,
          failure_path=S3_FAILURE_PATH,
          max_concurrent_invocations_per_instance=OPTIONAL_MAX_CONCURRENT_INVOCATIONS,
          kms_key_id=OPTIONAL_KMS_KEY_ID,
          notification_config=OPTIONAL_NOTIFICATION_CONFIG,
      )
  
      assert (
          async_inference_config_with_optional._to_request_dict()
          == ASYNC_INFERENCE_DICT_WITH_OPTIONAL
      )
  
imports: from __future__ import absolute_import
  from sagemaker.async_inference import AsyncInferenceConfig
label_desc: Use image node_id 3 for calling a global function with example usage: test_to_request_dict() without return types