Refactor retrieve_instances with RedisQuerySetTransformer