The district attorney has authority, on the terms prescribed by law, to enter a nolle prosequi on indictments.