code: def region_matches_partition(region: str, partition: str) -> bool:
      """
      Returns True if the provided region and partition are a valid pair.
  
      :param region: AWS region code to test.
      :param partition: AWS partition code to test.
      :return: Returns True if the provided region and partition are a valid pair.
      """
      valid_matches: list[tuple[str, str]] = [
          ("cn-", "aws-cn"),
          ("us-gov-", "aws-us-gov"),
          ("us-gov-iso-", "aws-iso"),
          ("us-gov-iso-b-", "aws-iso-b"),
      ]
  
      for prefix, expected_partition in valid_matches:
          if region.startswith(prefix):
              return partition == expected_partition
      return partition == "aws"
  
file_path: airflow/tests/providers/amazon/aws/utils/eks_test_utils.py
imports: from __future__ import annotations
  import re
  from copy import deepcopy
  from typing import TYPE_CHECKING, Pattern, Type, Union
  from ..utils.eks_test_constants import STATUS, ClusterAttributes, ClusterInputs, FargateProfileAttributes, FargateProfileInputs, NodegroupAttributes, NodegroupInputs, ResponseAttributes
label_desc: Use image node_id 5 for calling a global function with example usage: region_matches_partition(region, partition) and returns: unknown, unknown