It doesn't work for the multi-output case, Can that be done in another PR?