Whenever thirty citizens of any ward, in the city of Philadelphia, shall present a petition to the court of common pleas of the said city, setting forth that in any election division of said ward the inspectors of elections, or the return inspectors, are of the same political party, and have been chosen, or elected, in violation of the spirit and intention of the several acts of assembly, regulating elections, verified by the oaths, or affirmations, of any two of them, it shall be the duty of the said court to grant a rule on the officers returned, chosen or elected, for such division, to show cause, if any they have, why the selection of such election officers should not be set aside; and if, upon the investigation of the matters set forth in the said petition, they shall be found to be true, it shall be the duty of said court to set aside the selection of such officers, and to appoint a judge, two inspectors and two return inspectors, to serve in such election division, for the next election, and until others are duly elected, or chosen; said appointments may be made from any part of the ward in which such election division is located; and the officers, so appointed, shall have and exercise the same powers and duties, and be liable to the same penalties, as officers elected by the qualified voters now are.
25 P.S. § 58