After the jury has retired for deliberation, if there is any disagreement or doubt between the jurors as to the testimony, or if they desire to be informed on any point of law arising in the cause, they must require the officer in charge to conduct them into court. Upon being brought into court, the information required must be given after notifying the prosecuting attorney and the defendant or his attorney.