How to define a Function in a submesh based on function values present in an adjoining submesh?

This can for instance be done with a common interface in DOLFINx, with the latest developments (v0.9) on submeshes. See for instance: Discontinuity at interface using mixed domains - #2 by dokken