#NEWLINE# def JoinLists( **args ) : #NEWLINE# #INDENT# 'Take a dictionary of {long_name:values}, and join the values.\n\n    For each long_name, join the values into a string according to\n    JOIN_DELIMS.  If values is empty or None, replace with an empty string.\n\n    Returns:\n      A dictionary {long_name:joined_value} entries.\n  ' #NEWLINE# out = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , val ) in args . items ( ) : #NEWLINE# #INDENT# if val : #NEWLINE# #INDENT# out [ key ] = StrJoin ( JOIN_DELIMS [ key ] , val ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# out [ key ] = '' #NEWLINE# #UNINDENT# #UNINDENT# return out