<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _WritesString(self, content):
 """Writes a string to the sample file. Args: content (str):
 content to write to the sample file. """

    content_bytes = codecs.encode(content, 'utf-8')
    self._sample_file.write(content_bytes)