Wash the spinach and remove any thick stems (you can leave the thin stems of very young spinach). Put the leaves in a large saucepan with just the water that is clinging to the leaves and steam with the lid on for a minute or two, until the spinach crumples to a soft mass. Strain in a colander, then squeeze all the liquid out with your hands. Chop the spinach coarsely.
In a large frying pan, fry the onion in 3 tablespoons of the olive oil, stirring occasionally, until golden. Add the spinach, salt and pepper, allspice, and lemon juice or sumac and mix well, leaving the pan on the heat for a few moments so that any excess liquid can evaporate.
Cut the puff pastry in half to make rolling out more manageable. Lightly dust the rolling surface and the rolling pin with flour. Roll out each half into a thin sheet, turning the sheet over a few times and dusting it each time with a little flour. Cut it into rounds with a pastry cutter 4 inches in diameter. Off-cuts can be rolled into a ball and rolled out again, so you do not waste any part of the dough. Put the rounds in a pile and wrap it in plastic wrap. Do the same with the remaining pastry.
Take a round of pastry, lay it flat on one hand, and put a tablespoon of filling in the middle. To make the traditional Lebanese three-sided pie, lift up two sides and pinch the neighboring edges together, making a thin-ridged joint. Lift up the third side, join its two edges to the other two to make a small three-sided pyramid with a rounded base. Seal the openings by pinching the edges firmly all the way to the top. Repeat with the remaining pastry rounds and filling. Don’t worry if the pies open a little at the top to reveal the filling when they are cooked.
Place the pies on sheets of foil on baking trays, brush the tops with the remaining olive oil, and bake in an oven preheated to 350°F for 25 to 30 minutes, or until golden.
Add ½ cup pine nuts to the fried onions, and stir until they begin to color, before adding the spinach.