Add a KE-chain Notebook (e.g. notebook widget) to the customization.

        The widget will be saved to KE-chain.

        :param notebook: The Notebook to which the button will be coupled and will start when the button is pressed.
        :type notebook: :class:`Service` or UUID
        :param custom_title: A custom title for the notebook widget
            * False (default): Notebook name
            * String value: Custom title
            * None: No title
        :type custom_title: bool or basestring or None
        :param height: The height of the Notebook in pixels
        :type height: int or None
        :raises IllegalArgumentError: When unknown or illegal arguments are passed.

def add_notebook_widget(self, notebook, custom_title=False, height=None):
        """
        Add a KE-chain Notebook (e.g. notebook widget) to the customization.

        The widget will be saved to KE-chain.

        :param notebook: The Notebook to which the button will be coupled and will start when the button is pressed.
        :type notebook: :class:`Service` or UUID
        :param custom_title: A custom title for the notebook widget
            * False (default): Notebook name
            * String value: Custom title
            * None: No title
        :type custom_title: bool or basestring or None
        :param height: The height of the Notebook in pixels
        :type height: int or None
        :raises IllegalArgumentError: When unknown or illegal arguments are passed.
        """
        # Check whether the script is uuid type or class `Service`
        if isinstance(notebook, Service):
            notebook_id = notebook.id
        elif isinstance(notebook, text_type) and is_uuid(notebook):
            notebook_id = notebook
            notebook = self._client.service(id=notebook_id)
        else:
            raise IllegalArgumentError("When using the add_notebook_widget, notebook must be a Service or Service id. "
                                       "Type is: {}".format(type(notebook)))

        # Add custom title
        if custom_title is False:
            show_title_value = "Default"
            title = notebook.name
        elif custom_title is None:
            show_title_value = "No title"
            title = ''
        else:
            show_title_value = "Custom title"
            title = str(custom_title)

        # Declare notebook widget config
        config = {
            'title': title,
            'showTitleValue': show_title_value,
            'height': height if height else 800,
            'xtype': ComponentXType.NOTEBOOKPANEL,
            'serviceId': notebook_id
        }

        # Declare notebook widget meta
        meta = {
            'showTitleValue': show_title_value,
            'customHeight': height if height else 800,
            'customTitle': title,
            'serviceId': notebook_id
        }

        self._add_widget(dict(config=config, meta=meta, name=WidgetNames.NOTEBOOKWIDGET))