def validate(self, view):
    if (not isinstance(view, self._view_type)):
        raise TypeError(('%r is not an instance of %r.' % (view, self._view_type)))
    view.validate()
def validate(self, view):
    if (not isinstance(view, self._view_type)):
        raise TypeError(('%r is not an instance of %r.' % (view, self._view_type)))
    view.validate()