def is_widget_data_ok(self, widget_data):
        """Return True if widget data won't cause errors.

        Works by checking whether instantiating a widget
        using the data provided will raise an error or
        not and returning True if no exception is raised.
        """
        ### retrieve widget class using the widget
        ### name from the parameter widget metadata

        widget_name = widget_data["widget_name"]
        widget_cls = WIDGET_CLASS_MAP[widget_name]

        ### retrieve the keyword arguments
        kwargs = widget_data["widget_kwargs"]

        ### try instantiating the widget
        try:
            widget = widget_cls(**kwargs)

        ### if the instantiation fails, log the error and inform
        ### the user via dialog

        except Exception as err:

            msg = "It seems the values provided for the widget aren't valid."

            logger.exception(msg)
            USER_LOGGER.exception(msg)

            dialog_msg = msg + (
                " If you wish to proceed, please, fix the values."
                " The details of the error can be seen on the user log"
                " (on the graph/canvas, press <Ctrl+Shift+j> or access"
                " the \"Help > Show user log\" option on the menubar)."
            )

            create_and_show_dialog(dialog_msg, level_name='error')

        ### otherwise return True
        else:
            return True
Return True if widget data won't cause errors.

        Works by checking whether instantiating a widget
        using the data provided will raise an error or
        not and returning True if no exception is raised.
        
nodezator/editing/widgetpicker/main.py