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