code: def test_config_download_from_s3_and_merge(
      sagemaker_session,
      kms_key_arn,
      s3_uri_prefix,
      expected_merged_config,
  ):
      config_file_1_local_path = os.path.join(
          CONFIG_DATA_DIR, "sample_config_for_merge.yaml"
      )
      config_file_2_local_path = os.path.join(
          CONFIG_DATA_DIR, "sample_additional_config_for_merge.yaml"
      )
  
      config_file_1_as_yaml = open(config_file_1_local_path, "r").read()
      s3_uri_config_1 = os.path.join(s3_uri_prefix, "config_1.yaml")
  
      # Upload S3 files in case they dont already exist
      S3Uploader.upload_string_as_file_body(
          body=config_file_1_as_yaml,
          desired_s3_uri=s3_uri_config_1,
          kms_key=kms_key_arn,
          sagemaker_session=sagemaker_session,
      )
  
      # Set env variable so load_sagemaker_config can construct an S3 resource in the right region
      previous_env_value = os.getenv("AWS_DEFAULT_REGION")
      os.environ[
          "AWS_DEFAULT_REGION"
      ] = sagemaker_session.boto_session.region_name
  
      # The thing being tested.
      sagemaker_config = load_sagemaker_config(
          additional_config_paths=[
              s3_uri_config_1,
              config_file_2_local_path,
          ]
      )
  
      # Reset the env variable to what it was before (if it was set before)
      os.unsetenv("AWS_DEFAULT_REGION")
      if previous_env_value is not None:
          os.environ["AWS_DEFAULT_REGION"] = previous_env_value
  
      assert sagemaker_config == expected_merged_config
  
imports: from __future__ import absolute_import
  import os
  import pathlib
  import tempfile
  import pytest
  import yaml
  from botocore.config import Config
  from sagemaker import PipelineModel, image_uris, Model, Predictor, Session
  from sagemaker.config import load_sagemaker_config
  from sagemaker.model_monitor import DataCaptureConfig
  from sagemaker.s3 import S3Uploader
  from sagemaker.sparkml import SparkMLModel
  from sagemaker.utils import sagemaker_timestamp
  from tests.integ import DATA_DIR
  from tests.integ.kms_utils import get_or_create_kms_key
  from tests.integ.test_inference_pipeline import SCHEMA
  from tests.integ.timeout import timeout_and_delete_endpoint_by_name
label_desc: Use image node_id 6 for calling a global function with example usage: test_config_download_from_s3_and_merge(sagemaker_session, kms_key_arn, s3_uri_prefix, expected_merged_config) without return types