The attorney general of the state is the legal counsel for the system and shall advise the administrator and represent the system in a legal proceeding.