<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def characterSet(self, charset: str) -> None: """Set character set of this document."""

        charset_node = self._find_charset_node() or Meta(parent=self.head)
        charset_node.setAttribute('charset', charset)