What role does an attorney general perform in state governments?