Grease a pie dish and preheat the oven to 180oC.
Mix the butter and caster sugar, then add the flour, cocoa powder and half the ground almonds. Stir until you have a ball of dough.
Press the dough into the dish with your fingertips, making sure that it is even and not too thick. Bake for about 15 minutes.
Meanwhile, halve and pit the cherries.
Remove the pastry case from the oven and lower the oven temperature to about 150oC.
Sprinkle the remaining ground almonds over the pastry base.
To make the custard, put the cream in a pan and gently heat over a low temperature until warmed through. Whisk the eggs, sugar, and vanilla extract together in a jug until light and frothy. Slowly pour the cream onto this mixture, continuing to whisk all the time.
Place the cherries into the pastry case, then pout over the custard. Return to the oven for about 40 mins, but keep an eye on it. You want to keep a slight wobble in the center.