code: def string_to_regex(value: str) -> Pattern[str]:
      """
      Converts a string template into a regex template for pattern matching.
  
      :param value: The template string to convert.
      :returns: Returns a regex pattern
      """
      return re.compile(re.sub(r"[{](.*?)[}]", r"(?P<\1>.+)", value))
  
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 7 for calling a global function with example usage: string_to_regex(value) and returns: re