Writing a Generative AI Processor in Python