Whenever required by the grand jury of any court sitting within his county, it shall be the duty of the county attorney to attend them, for the purpose of examining witnesses in their presence, or of giving them advice in any legal matter, and to issue subpoenas and other process to bring up witnesses, and to draw up bills of indictment.
K.S.A. 19-713