code: def test_attach_deploy(
      mxnet_training_job,
      sagemaker_session,
      cpu_instance_type,
      cpu_instance_family,
  ):
      endpoint_name = unique_name_from_base("test-neo-attach-deploy")
  
      with timeout_and_delete_endpoint_by_name(
          endpoint_name, sagemaker_session
      ):
          estimator = MXNet.attach(
              mxnet_training_job, sagemaker_session=sagemaker_session
          )
  
          estimator.compile_model(
              target_instance_family=cpu_instance_family,
              input_shape={"data": [1, 1, 28, 28]},
              output_path=estimator.output_path,
          )
  
          serializer = JSONSerializer(
              content_type="application/vnd+python.numpy+binary"
          )
  
          predictor = estimator.deploy(
              1,
              cpu_instance_type,
              serializer=serializer,
              use_compiled_model=True,
              endpoint_name=endpoint_name,
          )
          data = numpy.zeros(shape=(1, 1, 28, 28))
          predictor.predict(data)
  
file_path: sagemaker-python-sdk/tests/integ/test_neo_mxnet.py
imports: from __future__ import absolute_import
  import os
  import numpy
  import pytest
  from sagemaker.mxnet.estimator import MXNet
  from sagemaker.mxnet.model import MXNetModel
  from sagemaker.serializers import JSONSerializer
  from sagemaker.utils import unique_name_from_base
  from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
  from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
label_desc: Use image node_id 2 for calling a global function with example usage: test_attach_deploy(mxnet_training_job, sagemaker_session, cpu_instance_type, cpu_instance_family) without return types