code: def test_prepare_container_def_mxnet(sagemaker_session, mxnet_model):
      expected_container_env_keys = [
          "SAGEMAKER_CONTAINER_LOG_LEVEL",
          "SAGEMAKER_PROGRAM",
          "SAGEMAKER_REGION",
          "SAGEMAKER_SUBMIT_DIRECTORY",
      ]
      model = MultiDataModel(
          name=MODEL_NAME,
          model_data_prefix=VALID_MULTI_MODEL_DATA_PREFIX,
          sagemaker_session=sagemaker_session,
          model=mxnet_model,
      )
  
      container_def = model.prepare_container_def(INSTANCE_TYPE)
  
      assert container_def["Image"] == MXNET_IMAGE
      assert (
          container_def["ModelDataUrl"] == VALID_MULTI_MODEL_DATA_PREFIX
      )
      assert container_def["Mode"] == MULTI_MODEL_CONTAINER_MODE
      # Check if the environment variables defined only for MXNetModel
      # are part of the MultiDataModel container definition
      assert set(container_def["Environment"].keys()) == set(
          expected_container_env_keys
      )
  
imports: from __future__ import absolute_import
  import os
  import pytest
  from mock import MagicMock, Mock, call, patch
  from sagemaker.multidatamodel import MULTI_MODEL_CONTAINER_MODE
  from sagemaker.multidatamodel import MultiDataModel
  from sagemaker.mxnet import MXNetModel, MXNetPredictor
label_desc: Use image node_id 8 for calling a global function with example usage: test_prepare_container_def_mxnet(sagemaker_session, mxnet_model) without return types