Section 22 of the CriminalProcedure (Scotland) Act 1995 states that where a person has beenarrested and charged with an offence which may be tried summarily, the officerin charge of a police station may:(a) liberate them upon awritten undertaking, signed by them and certified by the officer, in terms ofwhich the person agrees to appear at a specified court ...