If it appears to the court that the prosecution was instituted without probable cause and from malicious motives, the court may require the complaining witness or other person instituting the prosecution to appear and answer concerning his motives for instituting the prosecution. If, upon hearing, the court determines that the prosecution was instituted without probable cause and from malicious motives all costs in the case shall be taxed against the complaining witness or other person initiating the prosecution.
K.S.A. 22-3802