'Get the cursor from the last run of this query.
The source of this cursor varies depending on what the last call was:
- Run: A cursor that points immediately after the last result pulled off
the returned iterator.
- Get: A cursor that points immediately after the last result in the
returned list.
- Count: A cursor that points immediately after the last result counted.
Returns:
A datastore_query.Cursor object that can be used in subsequent query
requests.
Raises:
AssertionError: The query has not yet been run or cannot be compiled.'

def GetCursor(self):

    cursor_function = self.__cursor_source
    if cursor_function:
        cursor = cursor_function()
        if cursor:
            return cursor
    raise AssertionError('No    cursor    available,    either    this    query    has    not    been    executed    or    there    is    no    compilation    available    for    this    kind    of    query')
