helper/schema: add support for StateFunc
fmt