throw e;
}
PyFunction findDecoratedFunction(ScriptEngine engine, String name) {
Bindings bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE);
for (Object o : bindings.values()) {
if (o instanceof PyFunction) {
PyFunction f = (PyFunction) o;
PyObject d = f.__findattr__("__decorator__");
if (d instanceof PyFunction && name.equals(((PyFunction)d).__name__)) {
return f;