<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def close(self):
 """ Stop overwriting display, or update parent. """

        if self.parent:
            self.parent.update(self.parent.offset + self.offset)
            return
        self.output.write("\n")
        self.output.flush()