code: def fixture_sagemaker_session():
      boto_mock = Mock(name="boto_session", region_name=REGION)
      session = Mock(
          name="sagemaker_session",
          boto_session=boto_mock,
          boto_region_name=REGION,
          config=None,
          local_mode=False,
          s3_resource=None,
          s3_client=None,
          settings=SessionSettings(),
          default_bucket_prefix=None,
      )
  
      describe = {
          "ModelArtifacts": {"S3ModelArtifacts": "s3://m/m.tar.gz"}
      }
      session.sagemaker_client.describe_training_job = Mock(
          return_value=describe
      )
      session.sagemaker_client.list_tags = Mock(
          return_value=LIST_TAGS_RESULT
      )
      session.default_bucket = Mock(
          name="default_bucket", return_value=BUCKET_NAME
      )
      session.expand_role = Mock(name="expand_role", return_value=ROLE)
  
      # For tests which doesn't verify config file injection, operate with empty config
      session.sagemaker_config = {}
      return session
  
imports: from __future__ import absolute_import
  import logging
  import json
  import os
  import pytest
  from mock import MagicMock, Mock, patch, ANY
  from packaging.version import Version
  from sagemaker import image_uris
  from sagemaker.pytorch import PyTorch, TrainingCompilerConfig
  from sagemaker.pytorch.model import PyTorchModel
  from sagemaker.instance_group import InstanceGroup
  from sagemaker.session_settings import SessionSettings
  from tests.unit.sagemaker.training_compiler import EC2_GPU_INSTANCE_CLASSES
label_desc: Use image node_id 2 for calling a global function with example usage: fixture_sagemaker_session() and returns: session