Execute a query.

    database
        Name of the database to query on.

    query
        InfluxQL query string.

def query(database, query, **client_args):
    '''
    Execute a query.

    database
        Name of the database to query on.

    query
        InfluxQL query string.
    '''
    client = _client(**client_args)
    _result = client.query(query, database=database)

    if isinstance(_result, collections.Sequence):
        return [_pull_query_results(_query_result) for _query_result in _result if _query_result]
    return [_pull_query_results(_result) if _result else {}]