@nouiz: This would allocate memory that will not be freed, even if allow_gc is True. Moreover, I'm not even sure if it would correctly be freed when the function is destroyed, and I'm not sure what would happen if the same module was loaded more than once for different apply nodes in the same function.