The court, or a judge of the court in vacation, may, in such case, grant a habeas corpus, and discharge the party, if the party purges the contempt, upon such conditions in respect to the party's compliance with the decree as the judge thinks proper.
T.C.A. § 21-1-808