Preheat oven to 350°F (175°C). Grease and flour two 8x4-inch loaf pans.
In a large mixing bowl, combine cake mix, pistachio pudding, eggs, water, sour cream, oil, almond and vanilla extracts.
Mix with a hand mixer until smooth, about 2 minutes. Fold in chopped pistachios if using.
Divide batter evenly between prepared pans.
Bake for 40–45 minutes, or until a toothpick inserted in the center comes out clean.
Let cool in pans for 10 minutes, then transfer to a wire rack to cool completely.
In a small bowl, mix powdered sugar and milk until smooth. Drizzle over cooled loaves.