code: def mock_boto_session(client):
      role_mock = Mock()
      type(role_mock).arn = PropertyMock(return_value=ROLE)
  
      resource_mock = Mock()
      resource_mock.Role.return_value = role_mock
  
      session_mock = Mock(region_name=REGION)
      session_mock.resource.return_value = resource_mock
      session_mock.client.return_value = client
  
      return session_mock
  
imports: from __future__ import absolute_import
  from unittest.mock import Mock, PropertyMock
  import pytest
  from sagemaker.workflow.pipeline_context import PipelineSession
label_desc: Use image node_id 2 for calling a global function with example usage: mock_boto_session(client) and returns: session_mock