<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rank(self):
 """ Return the rank of the given hypergraph. @rtype: int @return: Rank of graph. """

        max_rank = 0
        
        for each in self.hyperedges():
            if len(self.edge_links[each]) > max_rank:
                max_rank = len(self.edge_links[each])
                
        return max_rank