You forgot here the `code-block`/`ipython` (or instead of `.. code-block::` you can also just use `::`, this is equivalent. But the same comment as above.