code: def test_mnist_distributed_gpu(
      sagemaker_session,
      tensorflow_training_latest_version,
      tensorflow_training_latest_py_version,
      **kwargs,
  ):
      if (
          Version(tensorflow_training_latest_version) >= Version("2.12")
          and kwargs["instance_type"] == "ml.p2.xlarge"
      ):
          pytest.skip(
              "P2 instances have been deprecated for sagemaker jobs starting TensorFlow 2.12"
          )
  
      _create_and_fit_estimator(
          sagemaker_session,
          tensorflow_training_latest_version,
          tensorflow_training_latest_py_version,
          kwargs["instance_type"],
      )
  
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 6 for calling a global function with example usage: test_mnist_distributed_gpu(sagemaker_session, tensorflow_training_latest_version, tensorflow_training_latest_py_version) without return types