Unless it is otherwise provided by this code or by rules adopted by the Judicial Council, either the superior court or the court on appeal may, in its discretion, order costs to be paid by any party to the proceedings, or out of the assets of the estate, as justice may require.