def group_by_xs(datasets):
    """
    Return datasets grouped by polarization cross section.
    """
    cross_sections = {}
    for data in datasets:
        cross_sections.setdefault(data.polarization, []).append(data)

    #print("datasets", [":".join((d.name, d.entry, d.polarization, d.intent)) for d in datasets])
    #print("xs", cross_sections)
    return cross_sections