...e) + "\n")
        f.flush()
```

Dann im Loop:

```python
for blk in blocks:
    block_id = blk.get("block_id") or blk.get("BLOCK_ID") or blk.get("id")
    if not block_id:
        # Fallback, damit niemals None
        block_id = f"IDX_{i:06d}"

    try:
        prompt = PROMPT.format(block_id=block_id, block_text=blk["text"])
        resp_text = ollama_generate(prompt)   # dein Call
        score_obj ...