code: def test_cbcx005_grouped_clicks(dash_duo):
      class context:
          calls = 0
          callback_contexts = []
          clicks = dict()
  
      app = Dash(__name__)
      app.layout = html.Div(
          [
              html.Button("Button 0", id="btn0"),
              html.Div(
                  [
                      html.Button("Button 1", id="btn1"),
                      html.Div(
                          [
                              html.Div(id="div3"),
                              html.Button("Button 2", id="btn2"),
                          ],
                          id="div2",
                          style=dict(
                              backgroundColor="yellow", padding="50px"
                          ),
                      ),
                  ],
                  id="div1",
                  style=dict(backgroundColor="blue", padding="50px"),
              ),
          ],
          id="div0",
          style=dict(backgroundColor="red", padding="50px"),
      )
  
      @app.callback(
          Output("div3", "children"),
          [
              Input("div1", "n_clicks"),
              Input("div2", "n_clicks"),
              Input("btn0", "n_clicks"),
              Input("btn1", "n_clicks"),
              Input("btn2", "n_clicks"),
          ],
          prevent_initial_call=True,
      )
      def update(div1, div2, btn0, btn1, btn2):
          context.calls = context.calls + 1
          context.callback_contexts.append(callback_context.triggered)
          context.clicks["div1"] = div1
          context.clicks["div2"] = div2
          context.clicks["btn0"] = btn0
          context.clicks["btn1"] = btn1
          context.clicks["btn2"] = btn2
  
      def click(target):
          ActionChains(dash_duo.driver).move_to_element_with_offset(
              target, 5, 5
          ).click().perform()
          dash_duo._wait_for_callbacks()
  
      dash_duo.start_server(app)
      click(dash_duo.find_element("#btn0"))
      assert context.calls == 1
      keys = list(
          map(
              operator.itemgetter("prop_id"),
              context.callback_contexts[-1:][0],
          )
      )
      assert len(keys) == 1
      assert "btn0.n_clicks" in keys
  
      assert context.clicks.get("btn0") == 1
      assert context.clicks.get("btn1") is None
      assert context.clicks.get("btn2") is None
      assert context.clicks.get("div1") is None
      assert context.clicks.get("div2") is None
  
      click(dash_duo.find_element("#div1"))
      assert context.calls == 2
      keys = list(
          map(
              operator.itemgetter("prop_id"),
              context.callback_contexts[-1:][0],
          )
      )
      assert len(keys) == 1
      assert "div1.n_clicks" in keys
  
      assert context.clicks.get("btn0") == 1
      assert context.clicks.get("btn1") is None
      assert context.clicks.get("btn2") is None
      assert context.clicks.get("div1") == 1
      assert context.clicks.get("div2") is None
  
      click(dash_duo.find_element("#btn1"))
      assert context.calls == 3
      keys = list(
          map(
              operator.itemgetter("prop_id"),
              context.callback_contexts[-1:][0],
          )
      )
      assert len(keys) == 2
      assert "btn1.n_clicks" in keys
      assert "div1.n_clicks" in keys
  
      assert context.clicks.get("btn0") == 1
      assert context.clicks.get("btn1") == 1
      assert context.clicks.get("btn2") is None
      assert context.clicks.get("div1") == 2
      assert context.clicks.get("div2") is None
  
      click(dash_duo.find_element("#div2"))
      assert context.calls == 4
      keys = list(
          map(
              operator.itemgetter("prop_id"),
              context.callback_contexts[-1:][0],
          )
      )
      assert len(keys) == 2
      assert "div1.n_clicks" in keys
      assert "div2.n_clicks" in keys
  
      assert context.clicks.get("btn0") == 1
      assert context.clicks.get("btn1") == 1
      assert context.clicks.get("btn2") is None
      assert context.clicks.get("div1") == 3
      assert context.clicks.get("div2") == 1
  
      click(dash_duo.find_element("#btn2"))
      assert context.calls == 5
      keys = list(
          map(
              operator.itemgetter("prop_id"),
              context.callback_contexts[-1:][0],
          )
      )
      assert len(keys) == 3
      assert "btn2.n_clicks" in keys
      assert "div1.n_clicks" in keys
      assert "div2.n_clicks" in keys
  
      assert context.clicks.get("btn0") == 1
      assert context.clicks.get("btn1") == 1
      assert context.clicks.get("btn2") == 1
      assert context.clicks.get("div1") == 4
      assert context.clicks.get("div2") == 2
  
file_path: dash/tests/integration/callbacks/test_callback_context.py
imports: import json
  import operator
  import pytest
  from dash import Dash, ALL, Input, Output, html, dcc, callback_context, ctx
  from dash.exceptions import PreventUpdate, MissingCallbackContextException
  import dash.testing.wait
  from selenium.webdriver.common.action_chains import ActionChains
label_desc: Use image node_id 5 for calling a global function with example usage: test_cbcx005_grouped_clicks(dash_duo) without return types