code: def test_upload_aes_encrypted_string_file(sagemaker_session):
      result_s3_uri = sagemaker_session.upload_string_as_file_body(
          body=BODY,
          bucket=BUCKET_NAME,
          key=DESTINATION_DATA_TESTS_FILE,
          kms_key=AES_ENCRYPTION_ENABLED,
      )
  
      uploaded_files_with_args = [
          kwargs
          for name, args, kwargs in sagemaker_session.boto_session.mock_calls
          if name == "resource().Object().put"
      ]
  
      assert result_s3_uri == "s3://{}/{}".format(
          BUCKET_NAME, DESTINATION_DATA_TESTS_FILE
      )
      assert len(uploaded_files_with_args) == 1
      kwargs = uploaded_files_with_args[0]
      assert kwargs["Body"] == BODY
      assert kwargs["SSEKMSKeyId"] == AES_ENCRYPTION_ENABLED
  
imports: from __future__ import absolute_import
  import os
  from mock import MagicMock, Mock
  import pytest
  import sagemaker
label_desc: Use image node_id 3 for calling a global function with example usage: test_upload_aes_encrypted_string_file(sagemaker_session) without return types