code: def test_grva001_candlestick(dash_dcc, is_eager):
      app = Dash(__name__, eager_loading=is_eager)
      app.layout = html.Div(
          [
              html.Button(
                  id="button", children="Update Candlestick", n_clicks=0
              ),
              dcc.Graph(id="graph"),
          ]
      )
  
      @app.callback(
          Output("graph", "figure"), [Input("button", "n_clicks")]
      )
      def update_graph(n_clicks):
          return {
              "data": [
                  {
                      "open": [1] * 5,
                      "high": [3] * 5,
                      "low": [0] * 5,
                      "close": [2] * 5,
                      "x": [n_clicks] * 5,
                      "type": "candlestick",
                  }
              ]
          }
  
      dash_dcc.start_server(app=app)
  
      button = dash_dcc.wait_for_element("#button")
  
      # wait for Graph to be ready
      WebDriverWait(dash_dcc.driver, 10).until(
          EC.visibility_of_element_located(
              (By.CSS_SELECTOR, "#graph .main-svg")
          )
      )
  
      is_eager = "eager" if is_eager else "lazy"
  
      button.click()
      time.sleep(1)
      dash_dcc.percy_snapshot(f"candlestick - 1 click ({is_eager})")
  
      button.click()
      time.sleep(1)
      dash_dcc.percy_snapshot(f"candlestick - 2 click ({is_eager})")
  
      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 1 for calling a global function with example usage: test_grva001_candlestick(dash_dcc, is_eager) and returns: dict