<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def attach_const_node(node, name, value):
 """create a Const node and register it in the locals of the given node with the specified name """

    if name not in node.special_attributes:
        _attach_local_node(node, nodes.const_factory(value), name)