code: def test_cbmt001_called_multiple_times_and_out_of_order(dash_duo):
      app = Dash(__name__)
      app.layout = html.Div(
          [
              html.Button("Click", id="input", n_clicks=0),
              html.Div(id="output"),
          ]
      )
  
      call_count = Value("i", 0)
  
      @app.callback(
          Output("output", "children"), [Input("input", "n_clicks")]
      )
      def update_output(n_clicks):
          call_count.value += 1
          if n_clicks == 1:
              time.sleep(1)
          return n_clicks
  
      dash_duo.start_server(app)
      dash_duo.multiple_click("#input", clicks=3)
  
      time.sleep(3)
  
      assert call_count.value == 4, "get called 4 times"
      assert (
          dash_duo.find_element("#output").text == "3"
      ), "clicked button 3 times"
  
      assert not dash_duo.redux_state_is_loading
      assert dash_duo.get_logs() == []
  
file_path: dash/tests/integration/callbacks/test_multiple_callbacks.py
imports: import time
  from multiprocessing import Value, Lock
  import pytest
  from dash import Dash, Input, Output, State, callback_context, html, dcc, dash_table
  from dash.exceptions import PreventUpdate
  import dash.testing.wait
label_desc: Use image node_id 1 for calling a global function with example usage: test_cbmt001_called_multiple_times_and_out_of_order(dash_duo) and returns: n_clicks