code: def sagemaker_session(sagemaker_client):
      boto_mock = Mock(name="boto_session", region_name="us-west-2")
      session_mock = MagicMock(
          name="sagemaker_session",
          sagemaker_client=sagemaker_client,
          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 = ROLE_ARN
      session_mock._append_sagemaker_config_tags = Mock(
          name="_append_sagemaker_config_tags",
          side_effect=lambda tags, config_path_to_tags: tags,
      )
      # For tests which doesn't verify config file injection, operate with empty config
      session_mock.sagemaker_config = {}
      return session_mock
  
imports: from __future__ import print_function, absolute_import
  import copy
  import json
  import time
  from mock import patch, Mock, MagicMock
  import pytest
  from sagemaker.clarify import BiasConfig, DataConfig, ModelConfig, SHAPConfig, ModelPredictedLabelConfig
  from sagemaker.model_monitor import BiasAnalysisConfig, Constraints, CronExpressionGenerator, EndpointInput, BatchTransformInput, ExplainabilityAnalysisConfig, ModelBiasMonitor, ModelExplainabilityMonitor, MonitoringExecution, NetworkConfig
  from sagemaker.model_monitor.clarify_model_monitoring import ClarifyModelMonitor, ClarifyBaseliningJob, ClarifyMonitoringExecution
  from sagemaker.model_monitor.dataset_format import MonitoringDatasetFormat
label_desc: Use image node_id 2 for calling a global function with example usage: sagemaker_session(sagemaker_client) and returns: session_mock