<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_attr(self, name, value):
 """ Sets the value of an attribute. """

    self.exec_script("node.setAttribute(%s, %s)" % (repr(name), repr(value)))