<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _set_lastpage(self):
 """Calculate value of class attribute ``last_page``."""

        self.last_page = (len(self._page_data) - 1) // self.screen.page_size