def _get_locales_list() -> list[str]:
    """
    Returns a list of locales as strings.

    Raises:
        TypeError: If the first element of the locale list is not a string.
    """

    # Get the 'locales' dataset and obtain from that a list of locales
    # TODO: remove pandas
    locales = _get_locales_data()
    locale_list: list[str] = [entry["locale"] for entry in locales]

    # Ensure that `locale_list` is of the type 'str'
    # TODO: we control this data and should enforce this in the data schema
    locale_list: Any
    if not isinstance(locale_list[0], str):
        raise TypeError("Variable type mismatch. Expected str, got something entirely different.")
    return locale_list

    Returns a list of locales as strings.

    Raises:
        TypeError: If the first element of the locale list is not a string.
    
great_tables/_formats.py