code: def sagemaker_session():
      boto_mock = MagicMock(name="boto_session")
      ims = sagemaker.Session(boto_session=boto_mock)
      ims.default_bucket = Mock(
          name="default_bucket", return_value=BUCKET_NAME
      )
      return ims
  
file_path: sagemaker-python-sdk/tests/unit/test_upload_data.py
imports: from __future__ import absolute_import
  import os
  from mock import MagicMock, Mock
  import pytest
  import sagemaker
  from tests.unit import DATA_DIR
label_desc: Use image node_id 1 for calling a global function with example usage: sagemaker_session() and returns: ims