Stay calm, that way you can assess the situation and decide on a course of action. Don't jerk around...you know how we all yank the ft a few times to get the snake to commit...don't do that with h your hand or arm.
In my GTP cage, I have Ben's bars set into holders, not screwed into the walls. Not only does that facilitate cleaning, but it made it very easy to lift the snake and bar out the the door when he grabbed and wrapped me. Because I could travel, I was able to go sit down and I wound him back around his bar, like your grandma used to spool wrap her yarn.
I think that worked because I was moving his body, and he was out of his cage, but he was attached to his bar, and he didn't know what the heck was going on. Lol
I've had snakes wrap too tightly, but not bite... DRMB, Cuban Boa, my really big BP girl... offering a chair back to coil around from the front while unwinding the tail works well for me.