code: def sagemaker_session():
      boto_mock = Mock(name="boto_session", region_name=REGION)
      session_mock = MagicMock(
          name="sagemaker_session",
          boto_session=boto_mock,
          boto_region_name=REGION,
          config=None,
          local_mode=False,
          settings=SessionSettings(),
          default_bucket_prefix=None,
      )
      session_mock.default_bucket = Mock(
          name="default_bucket", return_value=BUCKET_NAME
      )
  
      session_mock.upload_data = Mock(
          name="upload_data", return_value=MOCKED_S3_URI
      )
      session_mock.download_data = Mock(name="download_data")
      session_mock.expand_role.return_value = ROLE
      session_mock.describe_processing_job = MagicMock(
          name="describe_processing_job",
          return_value=_get_describe_response_inputs_and_ouputs(),
      )
  
      # For tests which doesn't verify config file injection, operate with empty config
      session_mock.sagemaker_config = {}
      return session_mock
  
imports: from __future__ import absolute_import
  import copy
  import pytest
  from mock import Mock, patch, MagicMock
  from packaging import version
  from sagemaker import LocalSession
  from sagemaker.dataset_definition.inputs import S3Input, DatasetDefinition, AthenaDatasetDefinition, RedshiftDatasetDefinition
  from sagemaker.processing import ProcessingInput, ProcessingOutput, Processor, ScriptProcessor, ProcessingJob
  from sagemaker.session_settings import SessionSettings
  from sagemaker.spark.processing import PySparkProcessor
  from sagemaker.sklearn.processing import SKLearnProcessor
  from sagemaker.pytorch.processing import PyTorchProcessor
  from sagemaker.tensorflow.processing import TensorFlowProcessor
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
  from sagemaker.xgboost.processing import XGBoostProcessor
  from sagemaker.mxnet.processing import MXNetProcessor
  from sagemaker.network import NetworkConfig
  from sagemaker.processing import FeatureStoreOutput
  from sagemaker.fw_utils import UploadedCode
  from sagemaker.workflow.pipeline_context import PipelineSession, _PipelineConfig
  from sagemaker.workflow.functions import Join
  from sagemaker.workflow.execution_variables import ExecutionVariables
  from tests.unit import SAGEMAKER_CONFIG_PROCESSING_JOB
label_desc: Use image node_id 2 for calling a global function with example usage: sagemaker_session() and returns: session_mock