@cached_property
    def view(self):
        """
        Import view from string and cache it to current class instance.
        """
        imported = import_string(self.import_name)

        if isinstance(imported, type) and issubclass(imported, View):
            view_name = self.import_name.lower().replace('view', '')
            return imported.as_view(view_name)

        return imported
dataset/ETHPy150Open playpauseandstop/Flask-LazyViews/flask_lazyviews/utils.py/LazyView.view/original