#NEWLINE# def underscore_to_pascalcase( value ) : #NEWLINE# #INDENT# 'Converts a string from underscore_case to PascalCase.\n\n  Args:\n    value: Source string value.\n        Example - hello_world\n\n  Returns:\n    The string, converted to PascalCase.\n    Example - hello_world -> HelloWorld\n  ' #NEWLINE# if ( not value ) : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# def __CapWord( seq ) : #NEWLINE# #INDENT# for word in seq : #NEWLINE# #INDENT# ( yield word . capitalize ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# return '' . join ( __CapWord ( ( ( word if word else '_' ) for word in value . split ( '_' ) ) ) )