Update preprocess.py to handle NameError
Update preprocess.py to handle NameError

Issue #250 
Imports, functions and other variables defined in the global context of your main file of your Dataflow pipeline are, by default, not available in the worker execution environment, and such references will cause a NameError, unless the --save_main_session pipeline option is set to True. Please see https://cloud.google.com/dataflow/faq#how-do-i-handle-nameerrors for additional documentation on configuring your worker execution environment.
GoogleCloudPlatform/cloudml-samples,GoogleCloudPlatform/cloudml-samples