code: def test_gannt_groups_and_descriptions(self):
      # check if grouped gantt chart matches with expected output
  
      df = [
          dict(
              Task="Task A",
              Description="Task A - 1",
              Start="2008-10-05",
              Finish="2009-04-15",
              IndexCol="TA",
          ),
          dict(
              Task="Task B",
              Description="Task B - 1",
              Start="2008-12-06",
              Finish="2009-03-15",
              IndexCol="TB",
          ),
          dict(
              Task="Task C",
              Description="Task C - 1",
              Start="2008-09-07",
              Finish="2009-03-15",
              IndexCol="TC",
          ),
          dict(
              Task="Task C",
              Description="Task C - 2",
              Start="2009-05-08",
              Finish="2009-04-15",
              IndexCol="TC",
          ),
          dict(
              Task="Task A",
              Description="Task A - 2",
              Start="2009-04-20",
              Finish="2009-05-30",
              IndexCol="TA",
          ),
      ]
  
      test_gantt_chart = ff.create_gantt(
          df,
          colors=dict(
              TA="rgb(220, 0, 0)",
              TB="rgb(170, 14, 200)",
              TC=(1, 0.9, 0.16),
          ),
          show_colorbar=True,
          index_col="IndexCol",
          group_tasks=True,
      )
  
      exp_gantt_chart = graph_objs.Figure(
          **{
              "layout": {
                  "showlegend": True,
                  "yaxis": {
                      "range": [-1, 4],
                      "zeroline": False,
                      "ticktext": ["Task C", "Task B", "Task A"],
                      "tickvals": [0, 1, 2],
                      "autorange": False,
                      "showgrid": False,
                  },
                  "title": "Gantt Chart",
                  "height": 600,
                  "shapes": [],
                  "width": 900,
                  "xaxis": {
                      "zeroline": False,
                      "rangeselector": {
                          "buttons": [
                              {
                                  "count": 7,
                                  "step": "day",
                                  "stepmode": "backward",
                                  "label": "1w",
                              },
                              {
                                  "count": 1,
                                  "step": "month",
                                  "stepmode": "backward",
                                  "label": "1m",
                              },
                              {
                                  "count": 6,
                                  "step": "month",
                                  "stepmode": "backward",
                                  "label": "6m",
                              },
                              {
                                  "count": 1,
                                  "step": "year",
                                  "stepmode": "todate",
                                  "label": "YTD",
                              },
                              {
                                  "count": 1,
                                  "step": "year",
                                  "stepmode": "backward",
                                  "label": "1y",
                              },
                              {"step": "all"},
                          ]
                      },
                      "type": "date",
                      "showgrid": False,
                  },
                  "hovermode": "closest",
              },
              "data": [
                  {
                      "legendgroup": "rgb(170, 14, 200)",
                      "name": "TB",
                      "fillcolor": "rgb(170, 14, 200)",
                      "mode": "none",
                      "hoverinfo": "name",
                      "y": [0.8, 0.8, 1.2, 1.2],
                      "x": [
                          "2008-12-06",
                          "2009-03-15",
                          "2009-03-15",
                          "2008-12-06",
                      ],
                      "fill": "toself",
                  },
                  {
                      "legendgroup": "rgb(220, 0, 0)",
                      "name": "TA",
                      "fillcolor": "rgb(220, 0, 0)",
                      "mode": "none",
                      "hoverinfo": "name",
                      "y": [
                          1.8,
                          1.8,
                          2.2,
                          2.2,
                          None,
                          1.8,
                          1.8,
                          2.2,
                          2.2,
                      ],
                      "x": [
                          "2008-10-05",
                          "2009-04-15",
                          "2009-04-15",
                          "2008-10-05",
                          "2008-10-05",
                          "2009-04-20",
                          "2009-05-30",
                          "2009-05-30",
                          "2009-04-20",
                      ],
                      "fill": "toself",
                  },
                  {
                      "legendgroup": "rgb(255, 230, 41)",
                      "name": "TC",
                      "fillcolor": "rgb(255, 230, 41)",
                      "mode": "none",
                      "hoverinfo": "name",
                      "y": [
                          -0.2,
                          -0.2,
                          0.2,
                          0.2,
                          None,
                          -0.2,
                          -0.2,
                          0.2,
                          0.2,
                      ],
                      "x": [
                          "2008-09-07",
                          "2009-03-15",
                          "2009-03-15",
                          "2008-09-07",
                          "2008-09-07",
                          "2009-05-08",
                          "2009-04-15",
                          "2009-04-15",
                          "2009-05-08",
                      ],
                      "fill": "toself",
                  },
                  {
                      "showlegend": False,
                      "legendgroup": "rgb(170, 14, 200)",
                      "name": "",
                      "text": ["Task B - 1", "Task B - 1"],
                      "y": [1, 1],
                      "mode": "markers",
                      "marker": {
                          "opacity": 0,
                          "color": "rgb(170, 14, 200)",
                          "size": 1,
                      },
                      "x": ["2008-12-06", "2009-03-15"],
                  },
                  {
                      "showlegend": False,
                      "legendgroup": "rgb(220, 0, 0)",
                      "name": "",
                      "text": [
                          "Task A - 1",
                          "Task A - 1",
                          "Task A - 2",
                          "Task A - 2",
                      ],
                      "y": [2, 2, 2, 2],
                      "mode": "markers",
                      "marker": {
                          "opacity": 0,
                          "color": "rgb(220, 0, 0)",
                          "size": 1,
                      },
                      "x": [
                          "2008-10-05",
                          "2009-04-15",
                          "2009-04-20",
                          "2009-05-30",
                      ],
                  },
                  {
                      "showlegend": False,
                      "legendgroup": "rgb(255, 230, 41)",
                      "name": "",
                      "text": [
                          "Task C - 1",
                          "Task C - 1",
                          "Task C - 2",
                          "Task C - 2",
                      ],
                      "y": [0, 0, 0, 0],
                      "mode": "markers",
                      "marker": {
                          "opacity": 0,
                          "color": "rgb(255, 230, 41)",
                          "size": 1,
                      },
                      "x": [
                          "2008-09-07",
                          "2009-03-15",
                          "2009-05-08",
                          "2009-04-15",
                      ],
                  },
              ],
          }
      )
  
      self.assert_fig_equal(
          test_gantt_chart["data"][0], exp_gantt_chart["data"][0]
      )
      self.assert_fig_equal(
          test_gantt_chart["data"][1], exp_gantt_chart["data"][1]
      )
      self.assert_fig_equal(
          test_gantt_chart["data"][2], exp_gantt_chart["data"][2]
      )
      self.assert_fig_equal(
          test_gantt_chart["data"][3], exp_gantt_chart["data"][3]
      )
  
imports: import math
  from unittest import TestCase
  import datetime
  import plotly.figure_factory
  import plotly.io
  from plotly.exceptions import PlotlyError
  from plotly.tests.test_optional.optional_utils import NumpyTestUtilsMixin
  from plotly.graph_objs import graph_objs
  from plotly.tests.utils import TestCaseNoTemplate
label_desc: Use image node_id 4 for calling the TestGantt obj's underlying member method code with example usage: obj.test_gannt_groups_and_descriptions() without return types