The reset function gets the existing attendance_sessions that have a "caleventid" field set and then finds those calendar events and deletes them.
If you still have some old events in the calendar after running that script these will be events that are not linked to an existing session and you may need to delete them manually - I'm not sure how this would have occurred because the session deletion process should be cleaning up the old events.