:param list data: a list of strings to be sorted
    :param bool reverse: reverse flag, set to get the result in descending order
    :return: a list of strings, sorted alphabetically, according to Thai rules
    **Example**::
        >>> from pythainlp.util import *
        >>> collate(['ไก่', 'เป็ด', 'หมู', 'วัว'])
        ['ไก่', 'เป็ด', 'วัว', 'หมู']

def collate(data: Iterable, reverse: bool = False) -> List[str]:
    """
    :param list data: a list of strings to be sorted
    :param bool reverse: reverse flag, set to get the result in descending order
    :return: a list of strings, sorted alphabetically, according to Thai rules
    **Example**::
        >>> from pythainlp.util import *
        >>> collate(['ไก่', 'เป็ด', 'หมู', 'วัว'])
        ['ไก่', 'เป็ด', 'วัว', 'หมู']
    """
    return sorted(data, key=_thkey, reverse=reverse)