class_docstr: Make async prediction requests to an Amazon SageMaker endpoint.
class_docstr_tok: ["Make","async","prediction","requests","to","an","Amazon","SageMaker","endpoint","."]
docstr: Check the Amazon S3 output path for the output.
  
  Periodically check Amazon S3 output path for async inference result.
  Timeout automatically after max attempts reached
docstr_tok: ["Check","the","Amazon","S3","output","path","for","the","output",".","Periodically","check","Amazon","S3","output","path","for","async","inference","result",".","Timeout","automatically","after","max","attempts","reached"]
code: def _check_output_path(self, output_path, waiter_config):
      """Check the Amazon S3 output path for the output.
  
      Periodically check Amazon S3 output path for async inference result.
      Timeout automatically after max attempts reached
      """
      bucket, key = parse_s3_url(output_path)
      s3_waiter = self.s3_client.get_waiter("object_exists")
      try:
          s3_waiter.wait(
              Bucket=bucket,
              Key=key,
              WaiterConfig=waiter_config._to_request_dict(),
          )
      except WaiterError:
          raise PollingTimeoutError(
              message="Inference could still be running",
              output_path=output_path,
              seconds=waiter_config.delay * waiter_config.max_attempts,
          )
      s3_object = self.s3_client.get_object(Bucket=bucket, Key=key)
      result = self.predictor._handle_response(response=s3_object)
      return result
  
imports: from __future__ import absolute_import
  import threading
  import time
  import uuid
  from botocore.exceptions import WaiterError
  from sagemaker import s3
  from sagemaker.exceptions import PollingTimeoutError, AsyncInferenceModelError
  from sagemaker.async_inference import WaiterConfig, AsyncInferenceResponse
  from sagemaker.s3 import parse_s3_url
  from sagemaker.session import Session
  from sagemaker.utils import name_from_base, sagemaker_timestamp, format_tags
label_desc: Use image node_id 8 for calling the AsyncPredictor obj's underlying member method code with example usage: obj._check_output_path(output_path, waiter_config) and returns: result