Which statement best describes the function of the respiratory system?