code: def scrolling_base_widget(self):
          
          def orig_iter(w):
              while hasattr(w, 'original_widget'):
                  w = w.original_widget
                  yield w
              yield w
  
          def is_scrolling_widget(w):
              return hasattr(w, 'get_scrollpos') and hasattr(w, 'rows_max')
  
          for w in orig_iter(self):
              if is_scrolling_widget(w):
                  return w
          raise ValueError('Not compatible to be wrapped by ScrollBar: %r' % w)
docs: Nearest `original_widget` that is compatible with the scrolling API