It is commonly regarded that a presiding judge is the ultimate authority in the courtroom. If they go overboard, that would be subject to investigation (judicial conduct or crime) afterwards. However, while the court is in session, to what extent can the judge go nuts before being stopped by law enforcement, cuffed and dragged out of the bench to cells?
I was watching ...And Justice For All (1979) the other night, and this question got inspired by the scene at 14:35 where Judge Rayford pulls out a pistol and shoots at the ceiling as a means of putting the courtroom in order (there was a brawl going on):
And that made me think: what would happen if a judge like that went nuts, pulled out a machine gun and started shooting everybody? Took hostages, barricaded the courtroom while formally continuing the court "session"? Legally, would law enforcement be able to intervene?
If yes, where is the bright line dividing when a presiding judge can and cannot be subdued?