code: def test_mnist_async(
      sagemaker_session,
      cpu_instance_type,
      tf_full_version,
      tf_full_py_version,
  ):
      if tf_full_version == "2.7.0":
          tf_full_version = "2.7"
  
      estimator = TensorFlow(
          entry_point=SCRIPT,
          source_dir=MNIST_RESOURCE_PATH,
          role=ROLE,
          instance_count=1,
          instance_type="ml.c5.4xlarge",
          sagemaker_session=sagemaker_session,
          framework_version=tf_full_version,
          py_version=tf_full_py_version,
          tags=TAGS,
      )
      inputs = estimator.sagemaker_session.upload_data(
          path=os.path.join(MNIST_RESOURCE_PATH, "data"),
          key_prefix="scriptmode/mnist",
      )
      estimator.fit(
          inputs=inputs,
          wait=False,
          job_name=unique_name_from_base("test-tf-sm-async"),
      )
      training_job_name = estimator.latest_training_job.name
      time.sleep(20)
      endpoint_name = training_job_name
      _assert_training_job_tags_match(
          sagemaker_session.sagemaker_client,
          estimator.latest_training_job.name,
          TAGS,
      )
      with tests.integ.timeout.timeout_and_delete_endpoint_by_name(
          endpoint_name, sagemaker_session
      ):
          estimator = TensorFlow.attach(
              training_job_name=training_job_name,
              sagemaker_session=sagemaker_session,
          )
          model_name = "model-mnist-async"
          predictor = estimator.deploy(
              initial_instance_count=1,
              instance_type=cpu_instance_type,
              endpoint_name=endpoint_name,
              model_name=model_name,
          )
  
          result = predictor.predict(np.zeros(784))
          print("predict result: {}".format(result))
          _assert_endpoint_tags_match(
              sagemaker_session.sagemaker_client,
              predictor.endpoint_name,
              TAGS,
          )
          _assert_model_tags_match(
              sagemaker_session.sagemaker_client, model_name, TAGS
          )
          _assert_model_name_match(
              sagemaker_session.sagemaker_client,
              endpoint_name,
              model_name,
          )
  
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 8 for calling a global function with example usage: test_mnist_async(sagemaker_session, cpu_instance_type, tf_full_version, tf_full_py_version) without return types