def METHOD_NAME(sagemaker_session):
    with patch("logging.Logger.error") as mocked_error_log:
        with pytest.raises(ClientError):
            error = ClientError(
                error_response={"Error": {"Code": "403", "Message": "Forbidden"}},
                operation_name="foo",
            )
            sagemaker_session.boto_session.resource(
                "s3"
            ).meta.client.head_bucket.side_effect = error
            sagemaker_session.default_bucket()
            mocked_error_log.assert_called_once_with(
                "Bucket %s exists, but access is forbidden. Please try again after "
                "adding appropriate access.",
                DEFAULT_BUCKET_NAME,
            )
        assert sagemaker_session._default_bucket is None