def query(self, query, max_results=None, timeout=0, dry_run=False):
        """Submit a query to BigQuery.

        Parameters
        ----------
        query : str
            BigQuery query string
        max_results : int, optional
            The maximum number of rows to return per page of results.
        timeout : float, optional
            How long to wait for the query to complete, in seconds before
            the request times out and returns.
        dry_run : bool, optional
            If True, the query isn't actually run. A valid query will return an
            empty response, while an invalid one will return the same error
            message it would if it wasn't a dry run.

        Returns
        -------
        tuple
            (job id, query results) if the query completed. If dry_run is True,
            job id will be None and results will be empty if the query is valid
            or a ``dict`` containing the response if invalid.

        Raises
        ------
        BigQueryTimeoutException
            on timeout
        """

        logger.debug('Executing query: %s' % query)

        query_data = {
            'query': query,
            'timeoutMs': timeout * 1000,
            'dryRun': dry_run,
            'maxResults': max_results,
        }
        return self._submit_query_job(query_data)
dataset/ETHPy150Open tylertreat/BigQuery-Python/bigquery/client.py/BigQueryClient.query/original