presto-main/src/main/java/io/prestosql/sql/InterpretedFunctionInvoker.java/InterpretedFunctionInvoker/bindInstanceFactory
class InterpretedFunctionInvoker:    private static MethodHandle bindInstanceFactory(MethodHandle method, ScalarFunctionImplementation implementation)
    {
        if (!implementation.getInstanceFactory().isPresent()) {
            return method;
        }

        try {
            return method.bindTo(implementation.getInstanceFactory().get().invoke());
        }
        catch (Throwable throwable) {
            throw propagate(throwable);
        }
    }