def __intstring_2_intlist(int_str):
    """
    Takes a string of integers separated by commas
    and returns a list of integers
    """
    int_str = int_str.strip(' [],').replace(' ',',')
    int_list = int_str.replace(',,',',').split(',')
    for ix, int_val in enumerate(int_list):
        int_list[ix] = int(int_val)
    return int_list