Learn how to build a self-reviewing code generation loop: an LLM writes Python extraction code, runs it, verifies the output, and fixes it when it fails.