<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def at_rank(self, rank):
 """ Find the node above this node at rank ``rank`` """

        s = self
        while s:
            if s.rank == rank:
                return s
            s = s.parent
        raise ValueError("No node at rank {0} for {1}".format(
            rank, self.tax_id))