code: def test_merge_of_s3_default_config_file_and_regular_config_file(
      get_data_dir, expected_merged_config, s3_resource_mock
  ):
      config_file_content_path = os.path.join(
          get_data_dir, "sample_config_for_merge.yaml"
      )
      config_file_as_yaml = open(config_file_content_path, "r").read()
      config_file_bucket = "config-file-bucket"
      config_file_s3_prefix = "config/config.yaml"
      config_file_s3_uri = "s3://{}/{}".format(
          config_file_bucket, config_file_s3_prefix
      )
      list_file_entry_mock = Mock()
      list_file_entry_mock.key = config_file_s3_prefix
      s3_resource_mock.Bucket(name=config_file_bucket).objects.filter(
          Prefix=config_file_s3_prefix
      ).all.return_value = [list_file_entry_mock]
      response_body_mock = MagicMock()
      response_body_mock.read.return_value = config_file_as_yaml.encode(
          "utf-8"
      )
      s3_resource_mock.Object(
          config_file_bucket, config_file_s3_prefix
      ).get.return_value = {"Body": response_body_mock}
      additional_override_config_file_path = os.path.join(
          get_data_dir, "sample_additional_config_for_merge.yaml"
      )
      os.environ["SAGEMAKER_ADMIN_CONFIG_OVERRIDE"] = config_file_s3_uri
      assert expected_merged_config == load_sagemaker_config(
          additional_config_paths=[
              additional_override_config_file_path
          ],
          s3_resource=s3_resource_mock,
          repeat_log=True,
      )
      del os.environ["SAGEMAKER_ADMIN_CONFIG_OVERRIDE"]
  
imports: from __future__ import absolute_import
  import os
  import pytest
  import yaml
  import logging
  from mock import Mock, MagicMock, patch, call
  from sagemaker.config.config import load_local_mode_config, load_sagemaker_config, logger, non_repeating_log_factory, _DEFAULT_ADMIN_CONFIG_FILE_PATH, _DEFAULT_USER_CONFIG_FILE_PATH, _DEFAULT_LOCAL_MODE_CONFIG_FILE_PATH
  from jsonschema import exceptions
  from yaml.constructor import ConstructorError
label_desc: Use image node_id 17 for calling a global function with example usage: test_merge_of_s3_default_config_file_and_regular_config_file(get_data_dir, expected_merged_config, s3_resource_mock) without return types