code: def configure_key_pair_default(
      ec2_client_stub,
      region="us-west-2",
      expected_key_pair=DEFAULT_KEY_PAIR,
  ):
      patcher = mock.patch("os.path.exists")
  
      def mock_path_exists_key_pair(path):
          _, key_path = key_pair(
              0, region, expected_key_pair["KeyName"]
          )
          return path == key_path
  
      os_path_exists_mock = patcher.start()
      os_path_exists_mock.side_effect = mock_path_exists_key_pair
  
      ec2_client_stub.add_response(
          "describe_key_pairs",
          expected_params={
              "Filters": [
                  {
                      "Name": "key-name",
                      "Values": [expected_key_pair["KeyName"]],
                  }
              ]
          },
          service_response={"KeyPairs": [expected_key_pair]},
      )
  
imports: from typing import Dict, List
  import ray
  import copy
  import json
  from uuid import uuid4
  from ray.tests.aws.utils import helpers
  from ray.tests.aws.utils.constants import DEFAULT_INSTANCE_PROFILE, DEFAULT_KEY_PAIR, DEFAULT_SUBNET, A_THOUSAND_SUBNETS_IN_DIFFERENT_VPCS, DEFAULT_LT, TWENTY_SUBNETS_IN_DIFFERENT_AZS
  from ray.autoscaler._private.aws.config import key_pair
  from ray.tests.aws.utils.helpers import get_cloudwatch_dashboard_config_file_path, get_cloudwatch_alarm_config_file_path
  from ray.autoscaler._private.aws.cloudwatch.cloudwatch_helper import CLOUDWATCH_AGENT_INSTALLED_TAG, CLOUDWATCH_CONFIG_HASH_TAG_BASE
  from ray.autoscaler.tags import NODE_KIND_HEAD, TAG_RAY_NODE_KIND
  from unittest import mock
  from botocore.stub import ANY
label_desc: Use image node_id 2 for calling a global function with example usage: configure_key_pair_default(ec2_client_stub, region, expected_key_pair) and returns: unknown