def METHOD_NAME(filter_str, prjs_client):
    """Query and paginate all active projects."""
    request = prjs_client.list(filter=filter_str)
    while request is not None:
        response = gcp.execute_request(request)
        if not response:
            break
        yield response.get('projects', tuple())
        request = prjs_client.list_next(previous_request=request,
                                        previous_response=response)