Section 37. Such court or attorney may issue subpoenas for witnesses, who shall be allowed the same fees, whose attendance may be enforced in the same manner, and who shall be subject to the same penalties, as if served with a subpoena in behalf of the commonwealth in a criminal prosecution before such court.