def dict_diff(prv, nxt):
keys = set(list(prv.keys()) + list(nxt.keys()))<EOL>result = {}<EOL>for k in keys:<EOL><INDENT>if isinstance(prv.get(k), dict):<EOL><INDENT>if isinstance(nxt.get(k), dict):<EOL><INDENT>"<STR_LIT>"<EOL>diff = dict_diff(prv.get(k), nxt.get(k))<EOL>if diff:<EOL><INDENT>result[k] = diff<EOL><DEDENT><DEDENT>else:<EOL><INDENT>"<STR_LIT>"<EOL>result[k] = {"<STR_LIT:result>": prv.get(k), "<STR_LIT>": nxt.get(k)}<EOL><DEDENT><DEDENT>else:<EOL><INDENT>"<STR_LIT>" "<STR_LIT>"<EOL>if prv.get(k) != nxt.get(k) and nxt.get(k) != "<STR_LIT>":<EOL><INDENT>result[k] = {"<STR_LIT:result>": prv.get(k), "<STR_LIT>": nxt.get(k)}<EOL><DEDENT><DEDENT><DEDENT>return result<EOL>
Return a dict of keys that differ with another config object.