'Get a serialized cursor for an already executed query.
The returned cursor effectively lets a future invocation of a similar
query to begin fetching results immediately after the last returned
result from this query invocation.
Returns:
A base64-encoded serialized cursor.
Raises:
AssertionError: If the query has not been executed.'

def cursor(self):

    if (self._last_raw_query is None):
        raise AssertionError('No    cursor    available.')
    cursor = self._last_raw_query.GetCursor()
    return websafe_encode_cursor(cursor)
