<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def open_pager(self):
 """ Open the selected item with the system's pager """

        n_rows, n_cols = self.term.stdscr.getmaxyx()

        if self.config['max_pager_cols'] is not None:
            n_cols = min(n_cols, self.config['max_pager_cols'])

        data = self.get_selected_item()
        if data['type'] == 'Submission':
            text = '\n\n'.join((data['permalink'], data['text']))
            self.term.open_pager(text, wrap=n_cols)
        elif data['type'] == 'Comment':
            text = '\n\n'.join((data['permalink'], data['body']))
            self.term.open_pager(text, wrap=n_cols)
        else:
            self.term.flash()