Contributed to open source
https://github.com/elixir-nx/livebook/pull/229