code: def _report_figure(df: pd.DataFrame) -> [list, tuple]:
      """
  
      :param df:
      :return:
      """
  
      # Get data
      report_df = _calculate_report_data(df)
  
      # Maximum Drawdown
      max_start_date, max_end_date = _calculate_maximum(report_df)
      ex_max_start_date, ex_max_end_date = _calculate_maximum(
          report_df, True
      )
  
      index_name = report_df.index.name
      _temp_df = report_df.reset_index()
      _temp_df.loc[-1] = 0
      _temp_df = _temp_df.shift(1)
      _temp_df.loc[0, index_name] = "T0"
      _temp_df.set_index(index_name, inplace=True)
      _temp_df.iloc[0] = 0
      report_df = _temp_df
  
      # Create figure
      _default_kind_map = dict(
          kind="ScatterGraph", kwargs={"mode": "lines+markers"}
      )
      _temp_fill_args = {"fill": "tozeroy", "mode": "lines+markers"}
      _column_row_col_dict = [
          ("cum_bench", dict(row=1, col=1)),
          ("cum_return_wo_cost", dict(row=1, col=1)),
          ("cum_return_w_cost", dict(row=1, col=1)),
          (
              "return_wo_mdd",
              dict(row=2, col=1, graph_kwargs=_temp_fill_args),
          ),
          (
              "return_w_cost_mdd",
              dict(row=3, col=1, graph_kwargs=_temp_fill_args),
          ),
          ("cum_ex_return_wo_cost", dict(row=4, col=1)),
          ("cum_ex_return_w_cost", dict(row=4, col=1)),
          ("turnover", dict(row=5, col=1)),
          (
              "cum_ex_return_w_cost_mdd",
              dict(row=6, col=1, graph_kwargs=_temp_fill_args),
          ),
          (
              "cum_ex_return_wo_cost_mdd",
              dict(row=7, col=1, graph_kwargs=_temp_fill_args),
          ),
      ]
  
      _subplot_layout = dict()
      for i in range(1, 8):
          # yaxis
          _subplot_layout.update(
              {
                  "yaxis{}".format(i): dict(
                      zeroline=True, showline=True, showticklabels=True
                  )
              }
          )
          _show_line = i == 7
          _subplot_layout.update(
              {
                  "xaxis{}".format(i): dict(
                      showline=_show_line, type="category", tickangle=45
                  )
              }
          )
  
      _layout_style = dict(
          height=1200,
          title=" ",
          shapes=[
              {
                  "type": "rect",
                  "xref": "x",
                  "yref": "paper",
                  "x0": max_start_date,
                  "y0": 0.55,
                  "x1": max_end_date,
                  "y1": 1,
                  "fillcolor": "#d3d3d3",
                  "opacity": 0.3,
                  "line": {
                      "width": 0,
                  },
              },
              {
                  "type": "rect",
                  "xref": "x",
                  "yref": "paper",
                  "x0": ex_max_start_date,
                  "y0": 0,
                  "x1": ex_max_end_date,
                  "y1": 0.55,
                  "fillcolor": "#d3d3d3",
                  "opacity": 0.3,
                  "line": {
                      "width": 0,
                  },
              },
          ],
      )
  
      _subplot_kwargs = dict(
          shared_xaxes=True,
          vertical_spacing=0.01,
          rows=7,
          cols=1,
          row_width=[1, 1, 1, 3, 1, 1, 3],
          print_grid=False,
      )
      figure = SubplotsGraph(
          df=report_df,
          layout=_layout_style,
          sub_graph_data=_column_row_col_dict,
          subplots_kwargs=_subplot_kwargs,
          kind_map=_default_kind_map,
          sub_graph_layout=_subplot_layout,
      ).figure
      return (figure,)
  
imports: import pandas
  from ..graph import SubplotsGraph, BaseGraph
label_desc: Use image node_id 4 for calling a global function with example usage: _report_figure(df) and returns: figure