"""Flow-matching helpers used by GEM."""