def METHOD_NAME(self, output_dir):
    # https://plotly.com/python/gantt/
    import plotly.figure_factory
    def make_jormun_dict(task):
        return dict(
            Task="J{}#{}".format(task.sub_request_id, task.task_name),
            Start=task.start,
            Finish=task.end,
            SubRequest="J{}#{}".format(task.sub_request_id, task.task_name),
        )
    def make_kraken_dict(task):
        return dict(
            Task="Kraken_{}".format(task.worker),
            Start=task.start,
            Finish=task.end,
            SubRequest="K{}".format(task.sub_request_id),
        )
    df = [make_jormun_dict(task) for task in self.jormun_tasks]
    df.extend([make_kraken_dict(task) for tasks in self.kraken_tasks_by_worker.values() for task in tasks])
    # if the dict is empty, there is nothing to plot
    if not df:
        print("Nothing to plot for request_id : ", self.request_id)
        return
    import colorsys
    nb_of_colors = len(df)
    HSV_tuples = [(x * 1.0 / nb_of_colors, 0.5, 0.5) for x in range(nb_of_colors)]
    RGB_tuples = [colorsys.hsv_to_rgb(*x) for x in HSV_tuples]
    fig = plotly.figure_factory.METHOD_NAME(
        df, index_col='SubRequest', group_tasks=True, colors=RGB_tuples, show_colorbar=True, title=self.url
    )
    fig.update_layout(hoverlabel=dict(bgcolor="white", font_size=16, font_family="Rockwell", namelength=-1))
    html_str = plotly.io.to_html(fig)
    html_filename = "{}_{}.html".format(self.request_id, self.scenario)
    filepath = os.path.join(output_dir, html_filename)
    os.makedirs(output_dir, exist_ok=True)
    with open(filepath, 'w') as html_file:
        html_file.write(html_str)
    print("Created ", filepath)
    # fig.show(renderer="png")