code: def mxnet_training_job(
      sagemaker_session,
      mxnet_training_latest_version,
      mxnet_training_latest_py_version,
      cpu_instance_type,
  ):
      with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
          s3_prefix = "integ-test-data/mxnet_mnist"
          data_path = os.path.join(DATA_DIR, "mxnet_mnist")
  
          s3_source = sagemaker_session.upload_data(
              path=os.path.join(data_path, "sourcedir.tar.gz"),
              key_prefix="{}/src".format(s3_prefix),
          )
  
          mx = MXNet(
              entry_point="mxnet_mnist/mnist.py",
              source_dir=s3_source,
              role="SageMakerRole",
              framework_version=mxnet_training_latest_version,
              py_version=mxnet_training_latest_py_version,
              instance_count=1,
              instance_type=cpu_instance_type,
              sagemaker_session=sagemaker_session,
          )
  
          train_input = mx.sagemaker_session.upload_data(
              path=os.path.join(data_path, "train"),
              key_prefix="{}/train".format(s3_prefix),
          )
          test_input = mx.sagemaker_session.upload_data(
              path=os.path.join(data_path, "test"),
              key_prefix="{}/test".format(s3_prefix),
          )
  
          mx.fit({"train": train_input, "test": test_input})
          return mx.latest_training_job.name
  
imports: from __future__ import absolute_import
  import os
  import time
  import numpy
  import pytest
  import tests.integ
  from sagemaker import ModelPackage
  from sagemaker.mxnet.estimator import MXNet
  from sagemaker.mxnet.model import MXNetModel
  from sagemaker.mxnet.processing import MXNetProcessor
  from sagemaker.serverless import ServerlessInferenceConfig
  from sagemaker.utils import unique_name_from_base
  from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.kms_utils import get_or_create_kms_key
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
label_desc: Use image node_id 1 for calling a global function with example usage: mxnet_training_job(sagemaker_session, mxnet_training_latest_version, mxnet_training_latest_py_version, cpu_instance_type) and returns: mx