[python] How do I use itertools.groupby()?