def _split_by_comma(s, length=50):
    """Group a comma-separated string into a list of at-most
    ``length``-length words each."""
    str_split = s.split(',')
    str_list = []
    for i in range(0, len(str_split) + length, length):
        temp_str = ','.join(str_split[i:i + length])
        if temp_str:
            str_list.append(temp_str)
    return str_list
