Ummm, I have found that continued and relaxed communication works well.
Don't get nervous, makes them nervous. Just tell them, "The gun is in my bag, Do you want the bag or want me to take it out for you Officer?"
If he ops for the bag it's easy although he might look through it he may just take the bag to his cruiser and give it back when he's done.
If he asks you to take it out then open the bag, reach in enough to grip the gun by the barrel and hand it too him grip first. He'll be alot less nervous with the barrel pointing at you instead of him. Just don't fiddle with it like checking if it's loaded, on safe, whatever.
Colt M1911, AR-15 | S&W Model 19, Model 27| SIG P238 | Berreta 85B Cheetah | Ruger Blackhawk .357MAG, Bearcat "Shopkeeper" .22LR| Remington Marine Magnum SP 12GA., Model 700 SPS .223