Preheat oven to 375°F. Spread 1/4 cup of sweetened coconut in a dark pan. Toast in the oven, stirring often, until golden brown. Set aside to cool completely.
In a large bowl, combine the 2 boxes of instant coconut cream pudding mix and the 3 1/3 cups of cold half-and-half.
Whisk vigorously for about 2 minutes until the pudding thickens.
Stir the 1/2 tsp of coconut flavoring into the thickened pudding.
Gently fold the 1 1/4 cups of un-toasted sweetened coconut into the pudding mixture.
Pour the thick filling into the completely cooled baked pie shell (or graham cracker/saltine crust). Smooth the top evenly.
If using, spread a layer of whipped cream over the top of the pie.
Sprinkle the cooled, toasted coconut flakes evenly over the top.
Chill in the refrigerator for at least 2 to 3 hours to allow the filling to set before slicing and serving.