A python script is used to control the motion of the head, including functions like coupling and decoupling from the pucks.