code: def _set_scroll_area(self, force=False):
          
  
          # Save scroll offset for resizing
          oldOffset = self.scroll_offset
          self.scroll_offset = newOffset = max(self.counters.values()) + 1
  
          if not self.enabled:
              return
  
          # Set exit handling only once
          if not self.process_exit:
              atexit.register(self._at_exit)
              if not self.no_resize and RESIZE_SUPPORTED:
                  signal.signal(signal.SIGWINCH, self._resize_handler)
              self.process_exit = True
  
          if self.set_scroll:
  
              term = self.term
              newHeight = term.height
              scrollPosition = max(0, newHeight - newOffset)
  
              if force or newOffset > oldOffset or newHeight != self.height:
                  self.height = newHeight
  
                  # Add line feeds so we don't overwrite existing output
                  if newOffset - oldOffset > 0:
                      term.move_to(0, max(0, newHeight - oldOffset))
                      self.stream.write('\n' * (newOffset - oldOffset))
  
                  # Reset scroll area
                  self.term.change_scroll(scrollPosition)
  
              # Always reset position
              term.move_to(0, scrollPosition)
              if self.companion_term:
                  self.companion_term.move_to(0, scrollPosition)
docs: Args:
              force(bool): Set the scroll area even if no change in height and position is detected
  
          Sets the scroll window based on the counter positions