<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(self, path):
 """Write the document's text to a ``path`` on the filesystem."""

        with codecs.open(path, 'w', encoding='utf-8') as f:
            f.write(self.text)