The foreman or any of the jurors may examine the witnesses appearing before them, and if necessary they may ask the states' attorney to assist them in such examination; and it is the duty of the state's attorney to advise them on matters of law if they desire information in that respect. But the state's attorney cannot lawfully take part in the deliberations of that body.16