118. Payment of costs out of security deposits and return of such deposits

  1. If in any order as to costs under the provisions of this chapter there is a direction for payment of costs by any party to any person, such costs shall, if they have not been already paid, be paid in full, or so far as possible, out of the security deposit and the further security deposit, if any, made by such party under this chapter on an application made in writing in that behalf within a period of one year from the date of such order to the court by the
    person in whose favour the costs have been awarded.
  2. If there is any balance left out of any of the said security deposits, after payment under sub-section (1) of the costs referred to in that sub-section, such balance, or where no costs have been awarded or no application as aforesaid has been made within the said period of one year the whole of the said security deposits may, on an application made in that behalf in writing to the court by the person by whom the deposit have been made, or
    if such person dies after making such deposits, by the legal representative of such person be returned to the said person or to his legal a representative, as the case may be.