code: def test_server_side_encryption(
      sagemaker_session, tf_full_version, tf_full_py_version
  ):
      with kms_utils.bucket_with_encryption(
          sagemaker_session, ROLE
      ) as (bucket_with_kms, kms_key):
          output_path = os.path.join(
              bucket_with_kms,
              "test-server-side-encryption",
              time.strftime("%y%m%d-%H%M"),
          )
  
          estimator = TensorFlow(
              entry_point="training.py",
              source_dir=TFS_RESOURCE_PATH,
              role=ROLE,
              instance_count=1,
              instance_type="ml.c5.xlarge",
              sagemaker_session=sagemaker_session,
              framework_version=tf_full_version,
              py_version=tf_full_py_version,
              code_location=output_path,
              output_path=output_path,
              model_dir="/opt/ml/model",
              output_kms_key=kms_key,
          )
  
          inputs = estimator.sagemaker_session.upload_data(
              path=os.path.join(MNIST_RESOURCE_PATH, "data"),
              key_prefix="scriptmode/mnist",
          )
  
          with tests.integ.timeout.timeout(
              minutes=tests.integ.TRAINING_DEFAULT_TIMEOUT_MINUTES
          ):
              estimator.fit(
                  inputs=inputs,
                  job_name=unique_name_from_base(
                      "test-server-side-encryption"
                  ),
              )
  
          endpoint_name = unique_name_from_base(
              "test-server-side-encryption"
          )
          with timeout.timeout_and_delete_endpoint_by_name(
              endpoint_name, sagemaker_session
          ):
              estimator.deploy(
                  initial_instance_count=1,
                  instance_type="ml.c5.xlarge",
                  endpoint_name=endpoint_name,
                  entry_point=os.path.join(
                      TFS_RESOURCE_PATH, "inference.py"
                  ),
              )
  
imports: from __future__ import absolute_import
  import numpy
  import os
  import time
  import pytest
  from sagemaker.serverless import ServerlessInferenceConfig
  from sagemaker.tensorflow import TensorFlow, TensorFlowProcessor, TensorFlowModel
  from sagemaker.utils import unique_name_from_base, sagemaker_timestamp
  import tests.integ
  from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES, kms_utils, timeout
  from tests.integ.retry import retries
  from tests.integ.utils import gpu_list, retry_with_instance_list
  from tests.integ.s3_utils import assert_s3_file_patterns_exist
  from packaging.version import Version
label_desc: Use image node_id 3 for calling a global function with example usage: test_server_side_encryption(sagemaker_session, tf_full_version, tf_full_py_version) without return types