def sort(value): """ The filter to return the sorted order of a list """ if isinstance(value, (ItemsView, list)): return sorted(value) return value