code: def test_default_bucket_with_sagemaker_config(
      boto_session_mock, client_mock
  ):
      # common kwargs for Session objects
      session_kwargs = {
          "boto_session": boto_session_mock,
          "sagemaker_client": client_mock,
      }
  
      # Case 1: Use bucket from sagemaker_config
      session_with_config_bucket = PipelineSession(
          default_bucket=None,
          sagemaker_config=SAGEMAKER_CONFIG_SESSION,
          **session_kwargs,
      )
      assert (
          session_with_config_bucket.default_bucket()
          == SAGEMAKER_CONFIG_SESSION["SageMaker"]["PythonSDK"][
              "Modules"
          ]["Session"]["DefaultS3Bucket"]
      )
  
      # Case 2: Use bucket from user input to Session (even if sagemaker_config has a bucket)
      session_with_user_bucket = PipelineSession(
          default_bucket="default-bucket",
          sagemaker_config=SAGEMAKER_CONFIG_SESSION,
          **session_kwargs,
      )
      assert (
          session_with_user_bucket.default_bucket() == "default-bucket"
      )
  
      # Case 3: Use default bucket of SDK
      session_with_sdk_bucket = PipelineSession(
          default_bucket=None,
          sagemaker_config=None,
          **session_kwargs,
      )
      session_with_sdk_bucket.boto_session.client.return_value = Mock(
          get_caller_identity=Mock(
              return_value={"Account": "111111111"}
          )
      )
      assert (
          session_with_sdk_bucket.default_bucket()
          == "sagemaker-us-west-2-111111111"
      )
  
imports: from __future__ import absolute_import
  import pytest
  from mock import Mock, PropertyMock
  from sagemaker import Model
  from sagemaker.workflow.pipeline_context import PipelineSession
  from sagemaker.workflow import is_pipeline_variable, is_pipeline_parameter_string
  from sagemaker.workflow.parameters import ParameterString, ParameterInteger, ParameterBoolean, ParameterFloat
  from sagemaker.workflow.functions import Join, JsonGet
  from tests.unit.sagemaker.workflow.helpers import CustomStep
  from tests.unit import DATA_DIR, SAGEMAKER_CONFIG_SESSION
label_desc: Use image node_id 11 for calling a global function with example usage: test_default_bucket_with_sagemaker_config(boto_session_mock, client_mock) without return types