doc: Function _generate_id() in the tutorial is not py3k compatible

This patch modifies the function to just generate a UUID, which will
work for both Python 2 and Python 3.

Closes #304