code: def get_widget(self, request):
          
          widget = self.widget
          if isinstance(widget, type):
              widget = widget()
          return widget
docs: Returns concrete widget that will be used for rendering table filter.