def _lists_group(items):
    """ items -> key_to_list_mapping """
    result = {}
    for key, val in items:
        try:
            list_ = result[key]
        except KeyError:
            list_ = [val]
            result[key] = list_
        else:
            list_.append(val)
    return result
