code: def empty_s3_client():
      """
      Returns a mocked S3 client with the `get_object` method overridden
      to raise different exceptions based on the input.
  
      Exceptions raised:
      - `ClientError` with code "NoSuchKey"
      - `AsyncInferenceModelError`
      - `ObjectNotExistedError`
      - `ClientError` with code "SomeOtherError"
      - `UnexpectedClientError`
  
      """
      s3_client = Mock(name="s3-client")
  
      client_error_no_such_key = ClientError(
          error_response={"Error": {"Code": "NoSuchKey"}},
          operation_name="async-inference-response-test",
      )
  
      async_error = AsyncInferenceModelError("some error message")
  
      object_error = ObjectNotExistedError(
          "some error message", DEFAULT_OUTPUT_PATH
      )
  
      client_error_other = ClientError(
          error_response={
              "Error": {
                  "Code": "SomeOtherError",
                  "Message": "some error message",
              }
          },
          operation_name="async-inference-response-test",
      )
  
      unexpected_error = UnexpectedClientError("some error message")
  
      s3_client.get_object = Mock(
          name="get_object",
          side_effect=[
              client_error_no_such_key,
              async_error,
              object_error,
              client_error_other,
              unexpected_error,
          ],
      )
      return s3_client
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/async_inference/test_async_inference_response.py
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock
  from botocore.exceptions import ClientError
  from sagemaker.predictor import Predictor
  from sagemaker.predictor_async import AsyncPredictor
  from sagemaker.async_inference import AsyncInferenceResponse
  from sagemaker.exceptions import AsyncInferenceModelError, ObjectNotExistedError, UnexpectedClientError
label_desc: Use image node_id 1 for calling a global function with example usage: empty_s3_client() and returns: s3_client