The county attorney of the county in which the hearing is held, the city attorney if the issuing authority is the city, or the attorney general shall attend the hearing, interrogate the witnesses, advise the issuing authority, and appear for the issuing authority on any appeal taken pursuant to the provisions of section 349.39.