If any taxpayer fails to file a return or files an insufficient return under the provisions of the Kansas income tax act, and after notice from the director of taxation, refuses or neglects within 20 days to file a proper return, the director may file an application for a writ of mandamus in the district court of Shawnee county to require such taxpayer to file a proper return. If the court finds that the taxpayer has unreasonably failed to file a return or has filed an insufficient return, the court shall order the taxpayer to file a proper return and shall assess all costs of the action against the taxpayer. In the event the court finds that the failure to file a return or that the insufficiency of a return was reasonable, costs of the action, including taxpayer's reasonable attorney fees, shall be assessed against the department of revenue. Failure to obey the order of the court shall be punishable by the court as contempt.
K.S.A. 79-3228a