Yep, they will often swab the trachea.
They will also perform a trans-tracheal wash in which a catheter (attached to a syringe filled with saline solution) is inserted into the trachea and the head is held slightly elevated. The vet then injects the saline into the trachea via the catheter. the volume of saline is usually 0.5 to 1% of the body weight of the snake.
The vet will then lower the head of the snake and the fluid is re-aspirated. The bacterial culture is then done on the fluid.
Many moons ago when I used to deal in larger numbers of animals (many imported) I used to collect tracheal fluids myself as part of the QT process, as many snakes came in heavily stressed, parasitized and suffering from the combined effects on the immune system. Our vet was cool enough to take the labelled fluid samples and test them for me.
The procedure is easy to perform if you have a second set of hands............