there is a tool that holds the valve centered while you bleed the brakes .
the light switch unscrews an the tool screws in its place .once brakes are bled remove the tool and replace the light. you can recenter the valve by opening the oposite end brake bleeder of the direction you want the valve to go.two people would help. gently step on the pedal and check the valve through the brake light warning switch opening until you see the notch in the plunger , close the bleeders and replace the switch. it sometimes takes a few try's