

def serialize(self):
    'Serialize the search to a structure as passed for a search body.'
    res = []
    for _sort in self.sort_orders:
        res.append(_sort.serialize())
    return (_sort or None)

dataset/ETHPy150Open aparo/pyes/pyes/sort.py SortFactory.serialize/VarMisuse@40/69 `res`->`_sort`