Found this hard, foam-like brown structure attached to a fence post in the backyard. I was about to scrape it off but hesitated. What is it?

hardens into a protective casing around the eggs, often resembling an oblong, foam-like structure. This casing provides insulation and protection against predators and adverse weather conditions.
Upon close inspection, you will notice the ootheca has a series of ridges or compartments, each containing multiple eggs. The texture is firm yet somewhat spongy, designed to withstand the elements while ensuring the safety of the developing embryos inside. The ootheca’s ingenious design allows it to remain secure and inconspicuous until the young mantises are ready to emerge.
4. Where You’ll Usually Find These Egg Cases Around the Yard
Praying mantis egg cases can be found in a variety of locations around your yard, typically in spots that offer some degree of protection and camouflage. You may discover them attached to the branches of shrubs, within dense vegetation, or on sturdy surfaces like fence posts and garden furniture.
The strategic placement of the