<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def top(self) -> "InstanceNode": """Return an instance node corresponding to the root of the data tree."""

        inst = self
        while inst.parinst:
            inst = inst.up()
        return inst