def create_label_groups(groups):
    """Create info dictionaries for label groups."""
    group_dicts = []
    if groups:
        for item in groups:
            dic = {}
            if len(item) == 1:
                dic['label'] = item[0]
                dic['name'] = item[0]
            elif len(item) == 2:
                dic['label'] = item[0]
                dic['name'] = item[1]
            else:
                raise ValueError('Label group takes 1 or 2 arguments')
            group_dicts.append(dic)
    return group_dicts