The Edinger–Westphal nucleus is a collection of neurons located in the midbrain, functioning as the primary parasympathetic control center for the eye, responsible for pupil constriction and lens accommodation. It plays a crucial role in the reflexive responses of the eye such as adjusting to different levels of light and focusing on objects at varying distances.