code: def test_grva003_empty_graph(dash_dcc, is_eager):
      app = Dash(__name__, eager_loading=is_eager)
  
      app.layout = html.Div(
          [
              html.Button(id="click", children="Click me"),
              dcc.Graph(
                  id="graph",
                  figure={
                      "data": [
                          dict(x=[1, 2, 3], y=[1, 2, 3], type="scatter")
                      ]
                  },
              ),
          ]
      )
  
      @app.callback(
          Output("graph", "figure"),
          [Input("click", "n_clicks")],
          [State("graph", "figure")],
      )
      def render_content(click, prev_graph):
          if click:
              return {}
          return prev_graph
  
      dash_dcc.start_server(app)
  
      def num_traces():
          return dash_dcc.driver.execute_script(
              """
              return (document.querySelector('.js-plotly-plot').data || []).length;
          """
          )
  
      dash_dcc.wait_for_element(".js-plotly-plot")
      assert num_traces() == 1
  
      dash_dcc.wait_for_element("#click").click()
      until(lambda: num_traces() == 0, timeout=2)
  
      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 3 for calling a global function with example usage: test_grva003_empty_graph(dash_dcc, is_eager) and returns: prev_graph, dash_dcc, dict