code: def test_default_bucket_with_sagemaker_config(boto_session, client):
      # common kwargs for Session objects
      session_kwargs = {
          "boto_session": boto_session,
      }
  
      # Case 1: Use bucket from sagemaker_config
      session_with_config_bucket = LocalSession(
          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 = LocalSession(
          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 = LocalSession(
          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 jsonschema
  import pytest
  import urllib3
  import os
  from botocore.exceptions import ClientError
  from mock import Mock, patch
  from tests.unit import DATA_DIR, SAGEMAKER_CONFIG_SESSION
  import sagemaker
  from sagemaker.workflow.parameters import ParameterString
  from sagemaker.workflow.pipeline import Pipeline
  from tests.unit.sagemaker.workflow.helpers import CustomStep
  from sagemaker.local.local_session import LocalSession
  from sagemaker.local.entities import _LocalPipelineExecution
label_desc: Use image node_id 38 for calling a global function with example usage: test_default_bucket_with_sagemaker_config(boto_session, client) without return types