code: def sagemaker_session():
      boto_mock = Mock(name="boto_session", region_name="us-west-2")
      session_mock = MagicMock(
          name="sagemaker_session",
          boto_session=boto_mock,
          boto_region_name="us-west-2",
          config=None,
          local_mode=False,
          default_bucket_prefix=None,
      )
      session_mock.default_bucket = Mock(
          name="default_bucket", return_value="mybucket"
      )
      session_mock.upload_data = Mock(
          name="upload_data",
          return_value="mocked_s3_uri_from_upload_data",
      )
      session_mock.download_data = Mock(name="download_data")
      session_mock.expand_role.return_value = (
          "arn:aws:iam::012345678901:role/SageMakerRole"
      )
      session_mock.sagemaker_config = {}
      return session_mock
  
imports: from __future__ import absolute_import, print_function
  import copy
  import pytest
  from mock import MagicMock, Mock, patch
  from sagemaker import Processor, image_uris
  from sagemaker.clarify import BiasConfig, DataConfig, ModelConfig, ModelPredictedLabelConfig, PDPConfig, SageMakerClarifyProcessor, SHAPConfig, TextConfig, ImageConfig, _AnalysisConfigGenerator, DatasetType, ProcessingOutputHandler, SegmentationConfig
label_desc: Use image node_id 27 for calling a global function with example usage: sagemaker_session() and returns: session_mock