Needs a bit of extra config but tis a really nice feature.
https://docs.marimo.io/guides/reusing_functions/