def _topLevelObjectGenerator(self, request, numObjects, getByIndexMethod):
        currentIndex = 0
        if request.pageToken is not None:
            currentIndex, = _parsePageToken(request.pageToken, 1)
        while currentIndex < numObjects:
            object_ = getByIndexMethod(currentIndex)
            currentIndex += 1
            nextPageToken = None
            if currentIndex < numObjects:
                nextPageToken = str(currentIndex)
            yield object_.toProtocolElement(), nextPageToken
Returns a generator over the results for the specified request, which
dataset/ETHPy150Open ga4gh/server/ga4gh/backend.py/Backend._topLevelObjectGenerator