code: def test_cbcx008_triggered_id_pmc(dash_duo):
      app = Dash()
      app.layout = html.Div(
          [
              html.Button(
                  "Click me", id={"type": "btn", "index": "myindex"}
              ),
              html.Div(id="output"),
          ]
      )
  
      @app.callback(
          Output("output", "children"),
          Input({"type": "btn", "index": ALL}, "n_clicks"),
      )
      def func(n_clicks):
          if ctx.triggered:
              triggered_id, dict_id = next(
                  iter(ctx.triggered_prop_ids.items())
              )
  
              assert dict_id == ctx.triggered_id
  
              if dict_id == {"type": "btn", "index": "myindex"}:
                  return dict_id["index"]
  
      dash_duo.start_server(app)
  
      dash_duo.find_element(
          '#\\{\\"index\\"\\:\\"myindex\\"\\,\\"type\\"\\:\\"btn\\"\\}'
      ).click()
      dash_duo.wait_for_text_to_equal("#output", "myindex")
  
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 8 for calling a global function with example usage: test_cbcx008_triggered_id_pmc(dash_duo) and returns: dict_id