The cardiopulmonary bypass pump does the work of the heart, pumping blood through the body, and making sure that the tissues of the body get the oxygen they need. 2 The machine also adds oxygen to the blood while taking over the pumping action of the heart, replacing the function of the lungs.