code: def test_default_bucket_prefix_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 prefix from sagemaker_config
      session_with_config_prefix = PipelineSession(
          default_bucket_prefix=None,
          sagemaker_config=SAGEMAKER_CONFIG_SESSION,
          **session_kwargs,
      )
      assert (
          session_with_config_prefix.default_bucket_prefix
          == SAGEMAKER_CONFIG_SESSION["SageMaker"]["PythonSDK"][
              "Modules"
          ]["Session"]["DefaultS3ObjectKeyPrefix"]
      )
  
      # Case 2: Use prefix from user input to Session (even if sagemaker_config has a prefix)
      session_with_user_prefix = PipelineSession(
          default_bucket_prefix="default-prefix",
          sagemaker_config=SAGEMAKER_CONFIG_SESSION,
          **session_kwargs,
      )
      assert (
          session_with_user_prefix.default_bucket_prefix
          == "default-prefix"
      )
  
      # Case 3: Neither the user input or config has the prefix
      session_with_no_prefix = PipelineSession(
          default_bucket_prefix=None,
          sagemaker_config=None,
          **session_kwargs,
      )
      assert session_with_no_prefix.default_bucket_prefix is None
  
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 12 for calling a global function with example usage: test_default_bucket_prefix_with_sagemaker_config(boto_session_mock, client_mock) without return types