from typing import Dict


def split_gate_name_2qutrit_single_base_matrix_into_base_matrix_names_angle(
    gate_name: str,
) -> Dict[str, str]:
    """Return base matrix names and angle for a given 2-qutrit single base matrix name.

    Parameters
    ----------
    gate_names : str
        Ex. "i01x90", "12yi180", "02z12y90"

    Returns
    ----------
    Dict[str, str]
        key = "base0", "base1", "angle".

        Ex.

        - {'base0': 'i', 'base1': '01x', 'angle':'90'}
        - {'base0': '12y', 'base1': 'i', 'angle':'180'}
        - {'base0': '02z', 'base1': '12y', 'angle':'90'}
    """
    l = []
    a = ""
    for s in gate_name:
        if s in ["i", "x", "y", "z"]:
            a = a + s
            l.append(a)
            a = ""
        else:
            a = a + s
    l.append(a)

    assert len(l) == 3
    res = {"base0": l[0], "base1": l[1], "angle": l[2]}
    return res