Add python version of rnndec, lookup.