Commenting the memoization part and also changing dict.keys reference to just the dict