public static Object createProxy(Class<?>[] interfaces, InvocationHandler h) throws Exception {
ClassLoader loader = GSDebugUtils.class.getClassLoader();
Class<?>[] modified = new Class[interfaces.length + 1];
System.arraycopy(interfaces, 0, modified, 0, interfaces.length);
modified[interfaces.length] = WrapperProxy.class;
InvocationHandler wrapper = new PyTypeToJavaTypeCoerceInvocationHandler(h);
return Proxy.newProxyInstance(loader, modified, wrapper);
}