Apple, Walnut, and Poppy Seed Pastry (Flódni)

The recipe for this traditional Hungarian dessert was inspired by one from Budapest food blogger Eszter Bodrogi and calls for four layers of jammy filling between sheets of pastry.