<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_local_node(self, child_node, name=None):
 """Append a child that should alter the locals of this scope node. :param child_node: The child node that will alter locals. :type child_node: NodeNG :param name: The name of the local that will be altered by the given child node. :type name: str or None """

        if name != "__class__":
            # add __class__ node as a child will cause infinite recursion later!
            self._append_node(child_node)
        self.set_local(name or child_node.name, child_node)