Line the bottom and sides of a 8-inch-square baking dish or 2-quart bowl eith the vanilla wafers. Set aside.
In a medium saucepan, combine the sugar and flour. Add the milk, whisk, and bring to a boil over medium-high heat. Lower the heat to medium-low and simmer, whisking constantly, until thick, about 3 to 4 minutes. Remove from the heat.
In a medium bowl, whisk the eggs. Gradually whisk about 3/4 cup of the hot milk into the egg. Return the egg mixture to the saucepan with the hot milk and bring to a boil. Lower the heat and simmer, whisking constantly, until smooth and thick, about 2 minutes. Remove from the heat and add the butter, vanilla extract and banana extract. Whisk until the butter is melted and the mixture is smooth. Strain the mixture through a fine mesh sieve into a bowl, place a piece of plastic wrap on the surface of the puddding to prevent a skin from forming and set aside to cool to room temperature.
In a medium bowl, whip the cream until soft peaks begin to form. Add the sugar and whip until stiff peaks start to form. Add the rum and whip to incorporate. Set aside.
Pour half of the pudding over the vanilla wafers, top with the bananas. Add the remaining pudding, smoothing it over the sliced bananas. Top with the whipped cream, and smooth with the back of a small offset spatula. Sprinkle the walnuts over the top.
Cover tightly and chill at least 2 hours before serving. Right before serving, drizzle with chocolate sauce.
Yield: 10 servings