Add optional role parameter to generation( ) method
Added example1.py