In the context of brain structures, the thalamus plays a crucial role in processing sensory information. Which of the following statements correctly describes the function of the thalamus?