Machine learning model predicts poor pain-related quality of life after endometriosis surgery to assist clinicians with preoperative counseling.