code: def sagemaker_session():
      session = MagicMock(
          boto_region_name=REGION,
          default_bucket_prefix=None,
      )
  
      session.create_inference_recommendations_job.return_value = (
          IR_JOB_NAME
      )
      session.wait_for_inference_recommendations_job.return_value = (
          IR_SAMPLE_INFERENCE_RESPONSE
      )
      session.sagemaker_config = {}
  
      return session
  
imports: from __future__ import absolute_import
  from unittest.mock import patch, MagicMock, ANY
  from sagemaker.model import Model, ModelPackage
  from sagemaker.parameter import CategoricalParameter
  from sagemaker.inference_recommender.inference_recommender_mixin import Phase, ModelLatencyThreshold
  from sagemaker.async_inference import AsyncInferenceConfig
  from sagemaker.serverless import ServerlessInferenceConfig
  from sagemaker.explainer import ExplainerConfig
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: sagemaker_session() and returns: session