code: def test_cbpi001_prevent_initial_call(flavor, dash_duo):
      app = make_app(flavor)
  
      layout = html.Div(
          [
              html.Button("click", id="btn"),
              html.Div("A", id="a"),
              html.Div("B", id="b"),
              html.Div("C", id="c"),
              html.Div("D", id="d"),
              html.Div("E", id="e"),
              html.Div("F", id="f"),
          ]
      )
      content_callback(app, flavor, layout)
  
      # Prevented, so A will only change after the button is clicked
      const_callback(
          app,
          flavor,
          "Click",
          Output("a", "children"),
          [Input("btn", "n_clicks")],
          prevent_initial_call=True,
      )
  
      # B depends on A - this *will* run, because prevent_initial_call is
      # not equivalent to PreventUpdate within the callback, it's treated as if
      # that callback was never in the initialization chain.
      concat_callback(
          app, flavor, Output("b", "children"), [Input("a", "children")]
      )
  
      # C matches B except that it also has prevent_initial_call itself, not just
      # its input A - so it will not run initially
      concat_callback(
          app,
          flavor,
          Output("c", "children"),
          [Input("a", "children")],
          prevent_initial_call=True,
      )
  
      @app.callback(Output("d", "children"), [Input("d", "style")])
      def d(_):
          raise PreventUpdate
  
      # E depends on A and D - one prevent_initial_call and one PreventUpdate
      # the prevent_initial_call means it *will* run
      concat_callback(
          app,
          flavor,
          Output("e", "children"),
          [Input("a", "children"), Input("d", "children")],
      )
  
      # F has prevent_initial_call but DOES fire during init, because one of its
      # inputs (B) was changed by a callback
      concat_callback(
          app,
          flavor,
          Output("f", "children"),
          [
              Input("a", "children"),
              Input("b", "children"),
              Input("d", "children"),
          ],
          prevent_initial_call=True,
      )
  
      dash_duo.start_server(app)
  
      # check from the end, to ensure the callbacks are all done
      dash_duo.wait_for_text_to_equal("#f", "AAD")
      dash_duo.wait_for_text_to_equal("#e", "AD"),
      dash_duo.wait_for_text_to_equal("#d", "D")
      dash_duo.wait_for_text_to_equal("#c", "C")
      dash_duo.wait_for_text_to_equal("#b", "A")
      dash_duo.wait_for_text_to_equal("#a", "A")
  
      dash_duo.find_element("#btn").click()
  
      dash_duo.wait_for_text_to_equal("#f", "ClickClickD")
      dash_duo.wait_for_text_to_equal("#e", "ClickD"),
      dash_duo.wait_for_text_to_equal("#d", "D")
      dash_duo.wait_for_text_to_equal("#c", "Click")
      dash_duo.wait_for_text_to_equal("#b", "Click")
      dash_duo.wait_for_text_to_equal("#a", "Click")
  
file_path: dash/tests/integration/callbacks/test_prevent_initial.py
imports: import json
  import pytest
  from flaky import flaky
  from dash import Dash, Input, Output, MATCH, html
  from dash.exceptions import PreventUpdate
label_desc: Use image node_id 5 for calling a global function with example usage: test_cbpi001_prevent_initial_call(flavor, dash_duo) without return types