You can do this with GraalVM. Here's an example:
https://github.com/graalvm/graalvm-demos/tree/master/polyglo...
And here's a polyglot notebook example: https://fniephaus.com/2019/px19-polyglot-notebooks.pdf
And finally, here's our GraalVM-powered Jupyter kernel: https://github.com/hpi-swa/ipolyglot