The K40 variety of lasers ship without any sort of safety switch to prevent the laser from firing while the lid is up. Wiring a safety switch into the laser on/off switch is an easy upgrade to improve the safety of the laser, and this holder helps to position the switch to work correctly.
Here are the type of switch I used: https://www.amazon.com/gp/product/B07MW3W79B
The switch dimensions are 20x10x7mm, so any microswitch matching those dimensions should work with this holder.
Depending on the orientation of your switch and which side of the switch you need to wire to you will need to snap/cut off one of the legs on the holder. I designed it with 2 legs because I didn't want to assume the orientation or the function of the switch to decide which leg should stay and which should go.
The anvil is just a small rectangular box so actuate the switch, because the wall of the lid is pretty thin and most likely won't hit the switch.
When you're happy with the positioning of the holder and anvil, just hot-glue them in place and you should be all set.
I printed with 4 shells so the holder is solid. Infill on the anvil can be anything.