whole_func_string: function stateTree(state) {
      if (state.children) state.children = stateTrees(state.children)
      return State(state)
    }
func_code_string: function stateTree(state) {
      if (state.children) state.children = stateTrees(state.children)
      return State(state)
    }
func_documentation_string: /*
  Creates an internal State object from a specification POJO.