code: def test_framework_initialization_with_sagemaker_config_injection(
      sagemaker_session,
  ):
      sagemaker_session.sagemaker_config = SAGEMAKER_CONFIG_AUTO_ML
  
      auto_ml = AutoML(
          target_attribute_name=TARGET_ATTRIBUTE_NAME,
          sagemaker_session=sagemaker_session,
      )
  
      expected_volume_kms_key_id = SAGEMAKER_CONFIG_AUTO_ML[
          "SageMaker"
      ]["AutoMLJob"]["AutoMLJobConfig"]["SecurityConfig"][
          "VolumeKmsKeyId"
      ]
      expected_role_arn = SAGEMAKER_CONFIG_AUTO_ML["SageMaker"][
          "AutoMLJob"
      ]["RoleArn"]
      expected_kms_key_id = SAGEMAKER_CONFIG_AUTO_ML["SageMaker"][
          "AutoMLJob"
      ]["OutputDataConfig"]["KmsKeyId"]
      expected_vpc_config = SAGEMAKER_CONFIG_AUTO_ML["SageMaker"][
          "AutoMLJob"
      ]["AutoMLJobConfig"]["SecurityConfig"]["VpcConfig"]
      expected_enable_inter_container_traffic_encryption = (
          SAGEMAKER_CONFIG_AUTO_ML["SageMaker"]["AutoMLJob"][
              "AutoMLJobConfig"
          ]["SecurityConfig"]["EnableInterContainerTrafficEncryption"]
      )
      assert auto_ml.role == expected_role_arn
      assert auto_ml.output_kms_key == expected_kms_key_id
      assert auto_ml.volume_kms_key == expected_volume_kms_key_id
      assert auto_ml.vpc_config == expected_vpc_config
      assert (
          auto_ml.encrypt_inter_container_traffic
          == expected_enable_inter_container_traffic_encryption
      )
  
imports: from __future__ import absolute_import
  import copy
  import pytest
  from mock import Mock, patch
  from sagemaker import AutoML, AutoMLJob, AutoMLInput, CandidateEstimator, PipelineModel
  from sagemaker.predictor import Predictor
  from sagemaker.session_settings import SessionSettings
  from sagemaker.workflow.functions import Join
  from tests.unit import SAGEMAKER_CONFIG_AUTO_ML, SAGEMAKER_CONFIG_TRAINING_JOB, _test_default_bucket_and_prefix_combinations, DEFAULT_S3_BUCKET_NAME, DEFAULT_S3_OBJECT_KEY_PREFIX_NAME
label_desc: Use image node_id 5 for calling a global function with example usage: test_framework_initialization_with_sagemaker_config_injection(sagemaker_session) without return types