After hearing the charge, the jury may either decide in court or may retire for deliberation. If they do not agree without retiring for deliberation, an officer shall be sworn to keep them together for deliberation in some private and convenient place, and, during the deliberation, not to permit any person to speak to or communicate with them, including any form of electronic or wireless communication, nor to do so himself or herself, unless by order of the court, or to ask them whether they have agreed upon a verdict, and to return them into court when they have so agreed, or when ordered by the court. The court shall fix the time and place for deliberation. The jurors shall not deliberate on the case except under those circumstances. If the jurors are permitted by the court to separate, the court shall properly admonish them as provided in subdivision (b) of Section 1122. If the jury is composed of both men and women, and the jurors are not permitted by the court to separate, in the event that it becomes necessary to retire for the night, the women shall be kept in a room or rooms separate and apart from the men.
Ca. Pen. Code § 1128