In cases of contempt by either party, a witness, or other persons, upon application to the court making the appointment, the judge thereof shall take such proceedings and impose such penalty as the facts authorize or require.