<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_node(self, char, node, patch):
 """Change a node's stats according to a dictionary. The ``patch`` dictionary should hold the new values of stats, keyed by the stats' names; a value of ``None`` deletes the stat. """

        character = self._real.character[char]
        if patch is None:
            del character.node[node]
        elif node not in character.node:
            character.node[node] = patch
            return
        else:
            character.node[node].update(patch)