def _split_generic_types(s: str) -> list[str]:
    """
    Split a generic type string into its components, ignoring commas inside nested generics.
    For example, "STRING, ARRAY<STRING>, MAP<STRING, INT>" becomes
    ["STRING", "ARRAY<STRING>", "MAP<STRING, INT>"].
    """
    parts = []
    current_chars = []
    depth = 0
    for ch in s:
        if ch == "<":
            depth += 1
        elif ch == ">":
            depth -= 1

        if ch == "," and depth == 0:
            parts.append("".join(current_chars).strip())
            current_chars = []
        else:
            current_chars.append(ch)
    if current_chars:
        parts.append("".join(current_chars).strip())
    return parts

    Split a generic type string into its components, ignoring commas inside nested generics.
    For example, "STRING, ARRAY<STRING>, MAP<STRING, INT>" becomes
    ["STRING", "ARRAY<STRING>", "MAP<STRING, INT>"].
    
ai/core/src/unitycatalog/ai/core/utils/callable_utils.py