01 - Preheat oven to 350°F (175°C) and line a baking sheet with parchment paper.
02 - In a large bowl, whisk together all-purpose flour, granulated sugar, baking powder, baking soda, salt, ground cinnamon, ground ginger, and ground nutmeg until well blended.
03 - In a separate bowl, whisk together eggs, pumpkin puree, vegetable oil, and vanilla extract until fully combined.
04 - Add wet mixture into the dry ingredients, stirring just until combined. Fold in half the sesame seeds and optional pecans or walnuts.
05 - Divide dough in half. Shape each portion into a log, approximately 10 inches long by 2 1/2 inches wide, on the prepared baking sheet. Gently flatten the tops.
06 - Sprinkle remaining sesame seeds over both logs and press lightly to adhere.
07 - Bake biscotti logs for 25 to 30 minutes or until golden and set. Let cool for 10 minutes on the baking sheet.
08 - Lower oven heat to 300°F (150°C).
09 - Using a sharp serrated knife, cut logs diagonally into 1/2-inch thick slices. Arrange slices cut side down on the baking sheet.
10 - Bake slices for 10 minutes. Flip each biscotti and bake for another 10 to 12 minutes until crisp and dry. Transfer to a wire rack and cool completely.