pytgl: Add stub serialize callbacks and a serialize struct generator.