Replace $keys/$modules by dict methods in py_builtin_functions.js