I forgot to add. I have taken some training, though probably not as much as I should have.
But I did take one course that was 4 hours of dealing with equipment problems during a gunfight. One such problem was running out of ammunition. Your friend should take that kind of course or go to a range and try to do a magazine change. Here's how, after making sure the range doesn't have an objection to your doing this.
Move the target rack as far away from you as it will go, typically 75 feet or so. Then switch the switch to start it back toward you. Immediately drop an empty magazine from your gun and retrieve another from wherever you are keeping it and insert it. Then rack the slide to be ready again. The instant you have done that, turn off the switch. Maybe have your friend do the switching for you.
If the target rack hasn't already smacked into the stop at your end, look how far it made it in that time. The result is going to be very eye-opening.
You might be able to change magazines in a gunfight after you've hit the attacker with some real rounds and slowed him a little if he's still coming at you. But you are very unlikely to have time to do that if he isn't hurt at all.