code: def sagemaker_session():
      boto_mock = Mock(name="boto_session", region_name=REGION)
      ims = Mock(
          name="sagemaker_session",
          boto_session=boto_mock,
          config=None,
          local_mode=False,
          region_name=REGION,
      )
  
      ims.default_bucket = Mock(
          name="default_bucket", return_value=BUCKET_NAME
      )
      ims.expand_role = Mock(name="expand_role", return_value=ROLE)
      ims.sagemaker_client.describe_training_job = Mock(
          return_value={
              "ModelArtifacts": {"S3ModelArtifacts": "s3://m/m.tar.gz"}
          }
      )
      return ims
  
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock
  from sagemaker.mxnet import MXNet
label_desc: Use image node_id 1 for calling a global function with example usage: sagemaker_session() and returns: ims