<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_sister(self, sister=None, name=None, dist=None):
 """ Adds a sister to this node. If sister node is not supplied as an argument, a new TreeNode instance will be created and returned. """

        if self.up == None:
            raise TreeError("A parent node is required to add a sister")
        else:
            return self.up.add_child(child=sister, name=name, dist=dist)