No. The most complete one is looked up somewhere in Linköping Universitys password management system*. That also delt with the setsid magic needed for yppasswd, passwd and friends. But it lacked a sane API so I never got around to extract it and contribute it to Pike proper before ending my employment there.
After that I've just written a custome state machine every time a problem suitable for Expect has come up.
Thus: Cake to whoever stops me from wring yet another state machine the next time.
* Well, more probably/hopefully it has long since been replaced.