code: def _test_default_bucket_and_prefix_combinations(
      function_with_user_input=None,
      function_without_user_input=None,
      expected__without_user_input__with_default_bucket_and_default_prefix=None,
      expected__without_user_input__with_default_bucket_only=None,
      expected__with_user_input__with_default_bucket_and_prefix=None,
      expected__with_user_input__with_default_bucket_only=None,
      session_with_bucket_and_prefix=Mock(
          name="sagemaker_session",
          sagemaker_config={},
          default_bucket=Mock(
              name="default_bucket", return_value=DEFAULT_S3_BUCKET_NAME
          ),
          default_bucket_prefix=DEFAULT_S3_OBJECT_KEY_PREFIX_NAME,
          config=None,
          settings=None,
      ),
      session_with_bucket_and_no_prefix=Mock(
          name="sagemaker_session",
          sagemaker_config={},
          default_bucket_prefix=None,
          default_bucket=Mock(
              name="default_bucket", return_value=DEFAULT_S3_BUCKET_NAME
          ),
          config=None,
          settings=None,
      ),
  ):
      """
      Helper to test the different possible scenarios of how S3 params will be generated.
  
      Possible scenarios:
          1. User provided their own input, so (in most cases) there is no need to use default params
          2. User did not provide input. Session has a default_bucket_prefix set
          2. User did not provide input. Session does NOT have a default_bucket_prefix set
      """
  
      actual_values = []
      expected_values = []
  
      # With Default Bucket and Default Prefix
      if expected__without_user_input__with_default_bucket_and_default_prefix:
          actual_values.append(
              function_without_user_input(
                  session_with_bucket_and_prefix
              )
          )
          expected_values.append(
              expected__without_user_input__with_default_bucket_and_default_prefix
          )
  
      # With Default Bucket and no Default Prefix
      if expected__without_user_input__with_default_bucket_only:
          actual_values.append(
              function_without_user_input(
                  session_with_bucket_and_no_prefix
              )
          )
          expected_values.append(
              expected__without_user_input__with_default_bucket_only
          )
  
      # With user input & With Default Bucket and Default Prefix
      if expected__with_user_input__with_default_bucket_and_prefix:
          actual_values.append(
              function_with_user_input(session_with_bucket_and_prefix)
          )
          expected_values.append(
              expected__with_user_input__with_default_bucket_and_prefix
          )
  
      # With user input & With Default Bucket and no Default Prefix
      if expected__with_user_input__with_default_bucket_only:
          actual_values.append(
              function_with_user_input(
                  session_with_bucket_and_no_prefix
              )
          )
          expected_values.append(
              expected__with_user_input__with_default_bucket_only
          )
  
      # It is better to put assert statements in the caller function rather than within here.
      # (If we put Asserts inside of this function, the info logged is not very debuggable. It just
      # says that the Assert failed, and doesn't show the difference.)
      return actual_values, expected_values
  
imports: from __future__ import absolute_import
  import os
  from mock.mock import Mock
  from sagemaker.config import SAGEMAKER, MONITORING_SCHEDULE, MONITORING_SCHEDULE_CONFIG, MONITORING_JOB_DEFINITION, MONITORING_OUTPUT_CONFIG, KMS_KEY_ID, MONITORING_RESOURCES, CLUSTER_CONFIG, VOLUME_KMS_KEY_ID, NETWORK_CONFIG, ENABLE_INTER_CONTAINER_TRAFFIC_ENCRYPTION, ENABLE_NETWORK_ISOLATION, VPC_CONFIG, SUBNETS, SECURITY_GROUP_IDS, ROLE_ARN, TAGS, KEY, VALUE, COMPILATION_JOB, OUTPUT_CONFIG, EDGE_PACKAGING_JOB, RESOURCE_KEY, ENDPOINT, ENDPOINT_CONFIG, DATA_CAPTURE_CONFIG, PRODUCTION_VARIANTS, AUTO_ML_JOB, AUTO_ML_JOB_CONFIG, SECURITY_CONFIG, OUTPUT_DATA_CONFIG, MODEL_PACKAGE, VALIDATION_SPECIFICATION, VALIDATION_PROFILES, TRANSFORM_JOB_DEFINITION, TRANSFORM_OUTPUT, TRANSFORM_RESOURCES, VALIDATION_ROLE, FEATURE_GROUP, OFFLINE_STORE_CONFIG, S3_STORAGE_CONFIG, ONLINE_STORE_CONFIG, PROCESSING_JOB, PROCESSING_INPUTS, DATASET_DEFINITION, ATHENA_DATASET_DEFINITION, REDSHIFT_DATASET_DEFINITION, CLUSTER_ROLE_ARN, PROCESSING_OUTPUT_CONFIG, PROCESSING_RESOURCES, TRAINING_JOB, PROFILER_CONFIG, DISABLE_PROFILER, RESOURCE_CONFIG, TRANSFORM_JOB, EXECUTION_ROLE_ARN, MODEL, ASYNC_INFERENCE_CONFIG, SCHEMA_VERSION, PYTHON_SDK, MODULES, DEFAULT_S3_BUCKET, DEFAULT_S3_OBJECT_KEY_PREFIX, SESSION, ENVIRONMENT, CONTAINERS, PRIMARY_CONTAINER, INFERENCE_SPECIFICATION, ESTIMATOR, DEBUG_HOOK_CONFIG
label_desc: Use image node_id 1 for calling a global function with example usage: _test_default_bucket_and_prefix_combinations(function_with_user_input, function_without_user_input, expected__without_user_input__with_default_bucket_and_default_prefix, expected__without_user_input__with_default_bucket_only, expected__with_user_input__with_default_bucket_and_prefix, expected__with_user_input__with_default_bucket_only, session_with_bucket_and_prefix, session_with_bucket_and_no_prefix) and returns: actual_values,  expected_values