<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def query(self, sql, timeout=10):
 """ Submit a query and return results. :param sql: string :param timeout: int :return: pydrill.client.ResultQuery """

        if not sql:
            raise QueryError('No query passed to drill.')

        result = ResultQuery(*self.perform_request(**{
            'method': 'POST',
            'url': '/query.json',
            'body': {
                "queryType": "SQL",
                "query": sql
            },
            'params': {
                'request_timeout': timeout
            }
        }))

        return result