code: def test_update_endpoint_with_nonexistent_config_throws_exception(
      sagemaker_client,
  ):
      model_name = "sample-model-name"
      create_sagemaker_model(
          sagemaker_client=sagemaker_client, model_name=model_name
      )
  
      endpoint_config_name = "sample-config"
      create_endpoint_config(
          sagemaker_client=sagemaker_client,
          endpoint_config_name=endpoint_config_name,
          model_name=model_name,
      )
  
      endpoint_name = "sample-endpoint"
      sagemaker_client.create_endpoint(
          EndpointConfigName=endpoint_config_name,
          EndpointName=endpoint_name,
      )
  
      with pytest.raises(
          ValueError, match="Attempted to update an endpoint"
      ):
          sagemaker_client.update_endpoint(
              EndpointName=endpoint_name,
              EndpointConfigName="nonexistent-config",
          )
  
imports: import boto3
  import pytest
  from tests.helper_functions import set_boto_credentials
  from tests.sagemaker.mock import mock_sagemaker
label_desc: Use image node_id 26 for calling a global function with example usage: test_update_endpoint_with_nonexistent_config_throws_exception(sagemaker_client) without return types