def as_sorted_mapping_seq(licenses):
    """
    Given a `licenses` iterator of to_dict()'able objects, return a sorted list
    of these.
    """
    return sorted((l.to_dict() for l in licenses), key=lambda x: tuple(x.items()))