The procedure is generally done under local anesthesia. The patient is often seated and leaned forward slightly. Using ultrasound guidance, a thin needle is inserted into the pleural space to withdraw the fluid. The fluid can then be tested for the presence of cancer cells or infections. In some cases, a catheter may be left in place for continuous drainage.