Get the html and script tag for a chart

def get_html(self, chart_obj=None, slug=None):
        """
        Get the html and script tag for a chart
        """
        if chart_obj is None:
            if self.chart_obj is None:
                self.err(
                    "No chart object registered, please provide "
                    "one in parameters"
                )
                return
            chart_obj = self.chart_obj
        try:
            if self.engine == "bokeh":
                html = self._get_bokeh_html(chart_obj)
                if html is None:
                    self.err("No html returned for " + str(chart_obj))
                return html
            elif self.engine == "altair":
                html = self._get_altair_html_(chart_obj, slug)
                if html is None:
                    self.err("No html returned for " + str(chart_obj))
                return html
            else:
                self.err("Chart engine " + self.engine + " unknown")
                return
        except Exception as e:
            self.err(e, "Can not get html from chart object")