'Return last Page in this book'

def last_page(self):

    for item in self.delegates:
        if isinstance(item, Main):
            temp = list(item.contents)
            temp.reverse()
            for candidate in temp:
                if isinstance(candidate, Page):
                    return candidate
