section 817(1)


817(1) The prosecutor in proceedings before a summary conviction court by whom an appeal is taken under section 813 shall, forthwith after filing the notice of appeal and proof of service thereof in accordance with section 815, appear before a justice, and the justice shall, after giving the prosecutor and the respondent a reasonable opportunity to be heard, order that the prosecutor (a) give an undertaking as prescribed in this section; or (b) enter into a recognizance in such amount, with or without sureties and with or without deposit of money or other valuable security, as the justice directs.