If a doctor suddenly had a heart attack while doing surgery, would the other doctors work on the doctor or the patient?

This is really a tricky question and there can be many answers for that.

If a team of doctors is conducting the surgery to a patient, then one of them may attend on the doctor and rush him to the Emergency room.

If only 2 doctors are in the surgery room, and one got the heart attack, based on the situation (progress of the surgery), the other doctor may take the decision to attend the doctor by himself or hand over to the head nurse to rush him to the emergency room. We assume there will be a cardiac department in the hospital which has the facility to attend the emergency cardiac attacks.