Some updates to data affinity doc

- Example code updated.

Have you generated the docs, I have the feelign this line might be too long on html (html is mostly smaller as pdf)