code: def test_default_bucket_s3_create_call(sagemaker_session):
      error = ClientError(
          error_response={
              "Error": {"Code": "404", "Message": "Not Found"}
          },
          operation_name="foo",
      )
      sagemaker_session.boto_session.resource(
          "s3"
      ).meta.client.head_bucket.side_effect = error
      bucket_name = sagemaker_session.default_bucket()
  
      create_calls = (
          sagemaker_session.boto_session.resource().create_bucket.mock_calls
      )
      _1, _2, create_kwargs = create_calls[0]
      assert bucket_name == DEFAULT_BUCKET_NAME
      assert len(create_calls) == 1
      assert create_kwargs == {
          "CreateBucketConfiguration": {
              "LocationConstraint": "us-west-2"
          },
          "Bucket": bucket_name,
      }
      assert sagemaker_session._default_bucket == bucket_name
  
file_path: sagemaker-python-sdk/tests/unit/test_default_bucket.py
imports: from __future__ import absolute_import
  import datetime
  import pytest
  from botocore.exceptions import ClientError
  from mock import MagicMock
  import sagemaker
label_desc: Use image node_id 3 for calling a global function with example usage: test_default_bucket_s3_create_call(sagemaker_session) without return types