The court shall order the losing party to pay the other party the sum it determines, in respect of costs incurred and not included in the costs. The parties may produce evidence of the sums they claim and the judge shall take into account the equity or economic situation of the party ordered to pay. He may, even of his own motion, for reasons based on the same considerations, declare that there are no grounds for such an order.