A judge of any court of record, clerk of such court, court reporter of such court, master, member of the board of supervisors, justice court judge, notary public, mayor, or police justice of a city, town or village, clerk of a municipality, and any officer of any other state, or of the United States, authorized by the law thereof to administer oaths, the judge of any court of record, or the mayor or chief magistrate of any city, borough or corporation of a foreign country; may administer oaths and take and certify affidavits whenever the same may be necessary or proper in a proceeding in any court or under any law of this state, or for the purpose of taking depositions of any party of interest, or witnesses of any suit pending before any such court, or for the perpetuation of testimony, as provided in Section 13-1-57, Mississippi Code of 1972.