Large dipole magnets guide the electron beam from the end of the South Linear Accelerator back to the beginning of the North Linear Accelerator. The electrons can make as many as five trips around the accelerator to gain energy.
Notice that there are more and bigger magnets near the floor. This is because the electrons in each pipe have been around the accelerator a different number of times. Those closest to the floor have been around the accelerator four times already, so they have the most energy. The more energy electrons have, the stronger the magnets have to be to bend them around the arc.