Line a pie plate with the defrosted pie crust. Prick with a fork and bake for 10 minutes.
Heat butter in a large skillet. Add onions and sauté until translucent. Add the mushrooms and simmer until the mushrooms are tender, stirring occasionally. About 5 minutes.
Stir in flour and add in half-and-half. Bring to a rapid boil, stirring frequently. Reduce heat to a simmer and add sherry. Season with salt and pepper.
Transfer mushroom filling into the prebaked pie crust. Use the second pie crust place on top of the filling. Cut 4 half-inch slits in the center and fold the dough over. Use a pastry brush to lightly brush the dough with an egg yolk, milk, or water.
Bake the mushroom pie for 20 minutes or until the crust is golden brown.