Add codes sample for save function.