def get_attr_groups(attr_name_file):
    """
    Read attribute names one by one from attr_name_file and based on the common prefix, separate them into different attribute groups
    Return list of starting indices of those groups
    """
    new_group_idx = [0]
    with open(attr_name_file, 'r') as f:
        all_lines = f.readlines()
        line0 = all_lines[0]
        prefix = line0.split()[1][:10]
        for i, line in enumerate(all_lines[1:]):
            curr = line.split()[1][:10] 
            if curr != prefix:
                new_group_idx.append(i+1)
                prefix = curr
    return new_group_idx