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