def equal_levels(self, other):
if self.nlevels != other.nlevels:<EOL><INDENT>return False<EOL><DEDENT>for i in range(self.nlevels):<EOL><INDENT>if not self.levels[i].equals(other.levels[i]):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Return True if the levels of both MultiIndex objects are the same