The defendant in any proceeding for contempt of court may file with the court a demand for the retirement of the judge sitting in the proceeding, if the contempt arises from an attack upon the character or conduct of such judge and if the attack occurred elsewhere than in the presence of the court or so near thereto as to interfere directly with the administration of justice. Upon the filing of any such demand the judge shall thereupon proceed no further, but another judge shall be designated in the same manner as is provided by law. The demand shall be filed prior to the hearing in the contempt proceeding.
IC 22-6-1-11