Python module to implement generate
