fix generate_image script to work with python 3
fix generate_image script to work with python 3

GoogleCloudDataproc/cloud-dataproc,GoogleCloudDataproc/custom-images,GoogleCloudDataproc/custom-images,GoogleCloudDataproc/cloud-dataproc,GoogleCloudDataproc/cloud-dataproc