#NEWLINE# def translate_arguments( self , script_arguments ) : #NEWLINE# #INDENT# 'Translate script argument to lists\n\n        Args:\n            script_arguments(list of str/dict): arguments to the script\n\n        Note:\n            Dict: (k -> v) is turned into an argument "--k=v"\n            List: Either pure strings or dictionaries with name, type and value\n        ' #NEWLINE# if ( script_arguments is None ) : #NEWLINE# #INDENT# return script_arguments #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( script_arguments , list ) : #NEWLINE# #INDENT# result = list ( ) #NEWLINE# for argument in script_arguments : #NEWLINE# #INDENT# if isinstance ( argument , dict ) : #NEWLINE# #INDENT# result . extend ( [ self . input_format ( key , get_modified_s3_path ( self ) ) for ( key , value ) in argument . iteritems ( ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# result . append ( get_modified_s3_path ( str ( argument ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return result #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( script_arguments , dict ) : #NEWLINE# #INDENT# return [ self . input_format ( key , get_modified_s3_path ( value ) ) for ( key , value ) in script_arguments . iteritems ( ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( script_arguments , str ) : #NEWLINE# #INDENT# return [ get_modified_s3_path ( script_arguments ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ETLInputError ( 'Script Arguments for unrecognized type' )