Where an application for judicial review lodged by the person prosecuted or by the civil party has been dismissed, the court may order the applicant to pay to the other party the sum it determines, in respect of costs not paid by the State and incurred by the latter. The parties may produce evidence of the sums they claim and the court shall take into account the equity or economic situation of the claimant in deciding whether to make such an order and in fixing the amount.