def rApply(d, f):
remainingDicts = [(d, ())]<EOL>while len(remainingDicts) > <NUM_LIT:0>:<EOL><INDENT>current, prevKeys = remainingDicts.pop()<EOL>for k, v in current.items():<EOL><INDENT>keys = prevKeys + (k,)<EOL>if isinstance(v, dict):<EOL><INDENT>remainingDicts.insert(<NUM_LIT:0>, (v, keys))<EOL><DEDENT>else:<EOL><INDENT>f(v, keys)<EOL><DEDENT><DEDENT><DEDENT>
Recursively applies f to the values in dict d.

    Args:
      d: The dict to recurse over.
      f: A function to apply to values in d that takes the value and a list of
          keys from the root of the dict to the value.