code: def build_modal(ext_aggs, chart_type, y):
      return [
          build_hoverable(
              html.I(
                  className="ico-settings pointer",
                  id="open-extended-agg-modal",
                  style=show_style(
                      chart_type not in NON_EXT_AGGREGATION and len(y)
                  ),
              ),
              html.Div(
                  html.Span(text("ext_agg_desc")),
                  id="extended-aggregation-tooltip",
              ),
              hover_class="saved-chart-config",
              top="100%",
              additional_classes="mb-auto mt-auto",
          ),
          dcc.Store(id="extended-aggregations", data=ext_aggs),
          dcc.Store(id="prev-open-extended-agg-modal", data=0),
          dcc.Store(id="prev-close-extended-agg-modal", data=0),
          dcc.Store(id="prev-clear-extended-agg-modal", data=0),
          dcc.Store(id="prev-apply-extended-agg-modal", data=0),
          dbc.Modal(
              [
                  dbc.ModalHeader(
                      html.Div(
                          [
                              html.Div(
                                  text("Extended Aggregations"),
                                  className="col mt-auto mb-auto",
                              ),
                              html.Button(
                                  html.Span("X"),
                                  className="close mr-5",
                                  id="close-extended-agg-modal",
                              ),
                          ],
                          className="row",
                      )
                  ),
                  dbc.ModalBody(build_body(ext_aggs)),
                  dbc.ModalFooter(
                      [
                          dbc.Button(
                              text("Clear"),
                              id="clear-extended-agg-modal",
                              className="ml-auto",
                          ),
                          dbc.Button(
                              text("Apply"),
                              id="apply-extended-agg-modal",
                          ),
                      ]
                  ),
              ],
              id="extended-agg-modal",
              size="lg",
              centered=True,
          ),
      ]
  
file_path: dtale/dtale/dash_application/extended_aggregations.py
imports: import dash_bootstrap_components
  from dash.dependencies import Input, Output, State
  from dtale.charts.utils import AGGS, NON_EXT_AGGREGATION
  from dtale.dash_application import dcc, html
  from dtale.dash_application.exceptions import DtalePreventUpdate
  from dtale.dash_application.layout.utils import build_hoverable, build_input, build_option, show_style
  from dtale.translations import text
  from dtale.utils import make_list
label_desc: Use image node_id 4 for calling a global function with example usage: build_modal(ext_aggs, chart_type, y) and returns: list