<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_child(self, index, child):
 """ Sets one of the node's children index 0 refers to the left, 1 to the right child """


        if index == 0:
            self.left = child
        else:
            self.right = child