<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def text_search(self, text, sort=None, offset=100, page=1):
 """ Search in aquarius using text query. Given the string aquarius will do a full-text query to search in all documents. Currently implemented are the MongoDB and Elastic Search drivers. For a detailed guide on how to search, see the MongoDB driver documentation: mongodb driverCurrently implemented in: https://docs.mongodb.com/manual/reference/operator/query/text/ And the Elastic Search documentation: https://www.elastic.co/guide/en/elasticsearch/guide/current/full-text-search.html Other drivers are possible according to each implementation. :param text: String to be search. :param sort: 1/-1 to sort ascending or descending. :param offset: Integer with the number of elements displayed per page. :param page: Integer with the number of page. :return: List of DDO instance """

        assert page >= 1, f'Invalid page value {page}. Required page >= 1.'
        payload = {"text": text, "sort": sort, "offset": offset, "page": page}
        response = self.requests_session.get(
            f'{self.url}/query',
            params=payload,
            headers=self._headers
        )
        if response.status_code == 200:
            return self._parse_search_response(response.content)
        else:
            raise Exception(f'Unable to search for DDO: {response.content}')