def _get_widget_class(self, widget_str):
        """Imports and returns the widget class.

        If widget_str does not specify a valid widget class, an exception is
        raised.
        """
        widget_class = self._get_class(widget_str)

        if not issubclass(widget_class, Widget):
            raise TypeError('%s is not a Widget class.' % widget_str)

        return widget_class
dataset/ETHPy150Open reviewboard/ReviewBot/extension/reviewbotext/forms.py/ProfileForm._get_widget_class/original