def fix_reserved_word(word, is_module=False):
if is_module:<EOL><INDENT>if word == '<STR_LIT>':<EOL><INDENT>word = '<STR_LIT>'  <EOL><DEDENT><DEDENT>else:<EOL><INDENT>if keyword.iskeyword(word):<EOL><INDENT>word += '<STR_LIT:_>'<EOL><DEDENT>elif word in ['<STR_LIT:id>', '<STR_LIT:type>', '<STR_LIT:str>', '<STR_LIT>', '<STR_LIT:input>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>word += '<STR_LIT:_>'<EOL><DEDENT><DEDENT>return word<EOL>
Replaces words that may be problematic

In particular the term 'type' is used in the osid spec, primarily as an argument
parameter where a type is provided to a method.  'type' is a reserved word
in python, so we give ours a trailing underscore. If we come across any other
osid things that are reserved word they can be dealt with here.

Copied from the builder binder_helpers.py file