Change python code blocks to yaml