A patient at 28 weeks gestation is in preterm labor.Betamethasone is ordered.What is the primary purpose of this medication?