<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_entry_to_file(file_descriptor, entry_comment, entry_key):
 """ Writes a localization entry to the file Args: file_descriptor (file, instance):
 The file to write the entry to. entry_comment (str):
 The entry's comment. entry_key (str):
 The entry's key. """

    escaped_key = re.sub(r'([^\\])"', '\\1\\"', entry_key)
    file_descriptor.write(u'/* %s */\n' % entry_comment)
    file_descriptor.write(u'"%s" = "%s";\n' % (escaped_key, escaped_key))