code: def test_dvui003_callback_graph(dash_duo):
      app = todo_app()
  
      dash_duo.start_server(
          app,
          debug=True,
          use_reloader=False,
          use_debugger=True,
          dev_tools_hot_reload=False,
      )
  
      dash_duo.wait_for_text_to_equal(
          "#totals", "0 of 0 items completed"
      )
  
      # reset compute and network times for all profiled callbacks, so we get
      # a consistent callback graph image
      dash_duo.driver.execute_script(
          """
          const cbProfiles = window.store.getState().profile.callbacks;
          Object.keys(cbProfiles).forEach(k => {
              cbProfiles[k].compute = 44;
              cbProfiles[k].network.time = 33;
              cbProfiles[k].total = 77;
          });
          """
      )
  
      dash_duo.find_element(".dash-debug-menu").click()
      sleep(1)  # wait for debug menu opening animation
      dash_duo.find_element(
          ".dash-debug-menu__button--callbacks"
      ).click()
      sleep(3)  # wait for callback graph to draw
      dash_duo.find_element('canvas[data-id="layer2-node"]')
  
      dash_duo.percy_snapshot(
          "devtools - callback graph", convert_canvases=True
      )
  
      pos = dash_duo.driver.execute_script(
          """
          const pos = store.getState().profile.graphLayout.positions['new-item.Xvalue'];
          pos.y -= 100;
          return pos.y;
          """
      )
  
      # hide and redraw the callback graph so we get the new position
      dash_duo.find_element(
          ".dash-debug-menu__button--callbacks"
      ).click()
  
      # fire callbacks so the profile state is regenerated
      dash_duo.find_element("#add").click()
      dash_duo.find_element(
          ".dash-debug-menu__button--callbacks"
      ).click()
      dash_duo.wait_for_text_to_equal(
          "#totals", "0 of 1 items completed - 0%"
      )
      sleep(2)
      # the manually moved node is still in its new position
      assert pos == dash_duo.driver.execute_script(
          """
          const pos = store.getState().profile.graphLayout.positions['new-item.Xvalue'];
          return pos.y;
          """
      )
  
file_path: dash/tests/integration/devtools/test_devtools_ui.py
imports: from time import sleep
  import flask
  from dash import Dash, Input, Output, dcc, html
  import dash.testing.wait
  from dash_test_components import WidthComponent
  from tests.assets.todo_app import todo_app
label_desc: Use image node_id 3 for calling a global function with example usage: test_dvui003_callback_graph(dash_duo) without return types