<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, **kwargs):
 u"""Updating or creation of new simple nodes. Each dict key is used as a tagname and value as text. """

        for key, value in kwargs.items():
            helper = helpers.CAST_DICT.get(type(value), str)
            tag = self._get_aliases().get(key, key)

            elements = list(self._xml.iterchildren(tag=tag))
            if elements:
                for element in elements:
                    element.text = helper(value)
            else:
                element = etree.Element(key)
                element.text = helper(value)
                self._xml.append(element)
                self._aliases = None