code: def test_upload_and_read_bytes(sagemaker_session, s3_files_kms_key):
      my_uuid = str(uuid.uuid4())
      base_s3_uri = os.path.join(
          "s3://",
          sagemaker_session.default_bucket(),
          "integ-test-test-upload-read-bytes",
          my_uuid,
      )
  
      body = bytes(my_uuid, "utf-8")
  
      S3Uploader.upload_bytes(
          body,
          s3_uri=os.path.join(base_s3_uri, "from_bytes"),
          kms_key=s3_files_kms_key,
          sagemaker_session=sagemaker_session,
      )
  
      S3Uploader.upload_bytes(
          io.BytesIO(body),
          s3_uri=os.path.join(base_s3_uri, "from_bytes_io"),
          kms_key=s3_files_kms_key,
          sagemaker_session=sagemaker_session,
      )
  
      assert body == S3Downloader.read_bytes(
          s3_uri=os.path.join(base_s3_uri, "from_bytes"),
          sagemaker_session=sagemaker_session,
      )
  
      assert body == S3Downloader.read_bytes(
          s3_uri=os.path.join(base_s3_uri, "from_bytes_io"),
          sagemaker_session=sagemaker_session,
      )
  
file_path: sagemaker-python-sdk/tests/integ/test_s3.py
imports: from __future__ import absolute_import
  import io
  import os
  import uuid
  import pytest
  from sagemaker.s3 import S3Uploader
  from sagemaker.s3 import S3Downloader
  from tests.integ.kms_utils import get_or_create_kms_key
label_desc: Use image node_id 6 for calling a global function with example usage: test_upload_and_read_bytes(sagemaker_session, s3_files_kms_key) without return types