code: def test_grva007_external_plotlyjs_prevents_lazy(is_eager, dash_dcc):
      # specific plotly.js version that's older than the built-in version
      v = "2.8.1"
      app = Dash(
          __name__,
          eager_loading=is_eager,
          external_scripts=[
              f"https://unpkg.com/plotly.js-dist-min@{v}/plotly.min.js"
          ],
      )
  
      app.layout = html.Div(id="div", children=[html.Button(id="btn")])
  
      @app.callback(
          Output("div", "children"), [Input("btn", "n_clicks")]
      )
      def load_chart(n_clicks):
          if n_clicks is None:
              raise PreventUpdate
  
          return dcc.Graph(
              id="output", figure={"data": [{"y": [3, 1, 2]}]}
          )
  
      dash_dcc.start_server(
          app,
          debug=True,
          use_reloader=False,
          use_debugger=True,
          dev_tools_hot_reload=False,
      )
  
      # Give time for the async dependency to be requested (if any)
      time.sleep(2)
  
      v_loaded = dash_dcc.driver.execute_script("return Plotly.version")
  
      # TODO: in eager mode, built-in plotly.js wins!! I don't think this is what we want.
      # But need to look into why we use the bare plotly.js bundle in eager mode, rather
      # than simply preloading the regular async chunk.
      if not is_eager:
          # as loaded in external_scripts
          assert v_loaded == v
  
      dash_dcc.find_element("#btn").click()
  
      # Give time for the async dependency to be requested (if any)
      time.sleep(2)
  
      # Check that the originally-loaded version is still the one we have
      assert (
          dash_dcc.driver.execute_script("return Plotly.version")
          == v_loaded
      )
  
      assert dash_dcc.get_logs() == []
  
imports: import pytest
  import time
  import json
  import werkzeug
  from selenium.webdriver import ActionChains
  from dash import Dash, Input, Output, State, dcc, html
  from dash.exceptions import PreventUpdate
  from dash.testing.wait import until
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions
label_desc: Use image node_id 9 for calling a global function with example usage: test_grva007_external_plotlyjs_prevents_lazy(is_eager, dash_dcc) and returns: dcc