code: def _Scroll(self, lines=None):
      
      if lines is None:
        lines = self._cli_lines
  
      if lines < 0:
        self._displayed -= self._cli_lines
        self._displayed += lines
        if self._displayed < 0:
          self._displayed = 0
        self._lines_to_show = self._cli_lines
      else:
        self._lines_to_show = lines
  
      self._lastscroll = lines
docs: Set attributes to scroll the buffer correctly.
  
      Args:
        lines: An int, number of lines to scroll. If None, scrolls
          by the terminal length.