You want to know the level of code quality required for automated test solutions and utilities.
Do not treat test automation as a full-fledged development project. Favor simplicity over production-grade code.
Strive to write maintainable test automation, but don’t sweat writing code that’s on the same level of the engineers building the product. Follow good programming practices, and prefer adding value to writing perfect code. In general, test automation is written for internal purposes only.