(a) When the case is finally submitted to the jury, they may decide in court or retire for deliberation.
(b)
(1) If the jury retires, they must be kept together in some convenient place, under the charge of an officer, until they agree upon a verdict or are discharged by the court, subject to the discretion of the court to permit them to separate temporarily at night and at their meals.
(2) The officer having them under his or her charge shall not allow any communication to be made to them, or make any himself or herself, except to ask them if they have agreed upon their verdict, unless by order of the court, and he or she shall not, before their verdict is rendered, communicate to any person the state of their deliberations or the verdict agreed upon.