Mix 4 cups of flour with the other dry ingredients together in bowl of stand mixer.
Add the wet ingredients (make sure the water is just barely warm—don’t kill the yeast!) and mix at medium low speed with dough hook until combined. If the dough is still sticky, add the additional ¼ cup of flour. Scrape the bowl to make sure all the flour is incorporated.
Mix at low speed until smooth, about five minutes.
Once smooth, dump dough on a lightly floured counter and gently form into a ball. Place dough into an oiled bowl, cover with a towel or plastic wrap and set in a warm place to rise.
Let rise for 1 hour or until doubled in size.
Forming the braid
Pre-heat the oven to 350 degrees.
Once the dough has doubled in size, remove from the bowl onto a lightly floured surface.
Using a sharp knife or pizza roller, cut the dough into two equal sections and using your hands, very gently roll into a large log about 12 inches long. From here you can cut each log into either 6 strands or 3, depending on your preference, but keep them attached at one end (see photo for example).
Being careful to handle the dough gently and not stretch out the strands of dough, braid the strands together in a traditional 3 strand braid or a 6 strand braid (see photo for step-by-step example). Once the strands are too short to continue braiding, pinch together and tuck under to form the end of the loaf. The top of the loaf can be pinched and tucked to match.
Place the loaf on a greased baking sheet or parchment lined baking sheet.
Mix a little water (about a teaspoon) with the egg yolk and use a pastry brush to coat the dough evenly. Sprinkle on optional sesame seeds or poppy seeds.
Bake at 350 for 30-40 minutes, until golden brown.