A 40-year-old woman is evaluated for intermittent heavy vaginal bleeding for the past year. Her menses had been regular until the past 2 years, when they became irregular and would sometimes skip for several months. Her last period was 3 months ago and lasted for almost 3 weeks. Menarche occurred when she was age 12 years. She has never been pregnant and is not currently sexually active. Her most recent cervical cancer screening was 2 years ago. Medical history is otherwise unremarkable, and she takes no medications.

On physical examination, vital signs are normal. BMI is 29. The general medical examination is unremarkable, as is the pelvic examination. A urine pregnancy test is negative.

Which of the following is the most appropriate diagnostic test to perform next?