experience. discussions. learn from others. learn by diving. extrapolate. learn your gear inside and out. learn your diving environment inside and out. learn yourself inside and out. Did I mention learn your gear? love you gear, practice in it, dive in it so much it's a second skin, become one with it, that way if you have to reach back and turn on a rolloff, or go on bailout (or a stage), it's just second nature, a non-issue. as long as you have a reg that works and a tank that has gas in it you are okay... You may have switch **** out a bit, have your buddy help get things sorted, but as long as you have a way to get breathable gas to your lungs, you have time to sort other stuff out if you keep your wits about you.
The things Leon talked to us about in my CCR class were likely places i'll never go and/or never be faced with. BUT, now i've actually heard of them, i have some answers in my arsenal to help solve lesser problems.
The bottom line is, as long as you are breathing, you have time to sort stuff out as long as you slow it down, get control of yourself and think. If that is reinforced again and again and again, hopefully it sticks.
this could also be a place where the training methods of the old days, where we DID turn peoples air off unexpectedly was actually helpful. You can either signal OOG, or reach back and check your valve. if you had a PITA buddy who was into hazing, usually the first thing you learned to do was check your valve. same with no mask drills... "oops, your mask is gone" (as you are videoing the wolf eel or something else non-training related)