code: def test_grva002_graphs_with_different_figures(dash_dcc, is_eager):
      app = Dash(__name__, eager_loading=is_eager)
      app.layout = html.Div(
          [
              dcc.Graph(
                  id="example-graph",
                  figure={
                      "data": [
                          {
                              "x": [1, 2, 3],
                              "y": [4, 1, 2],
                              "type": "bar",
                              "name": "SF",
                          },
                          {
                              "x": [1, 2, 3],
                              "y": [2, 4, 5],
                              "type": "bar",
                              "name": "Montréal",
                          },
                      ],
                      "layout": {"title": "Dash Data Visualization"},
                  },
              ),
              dcc.Graph(
                  id="example-graph-2",
                  figure={
                      "data": [
                          {
                              "x": [20, 24, 33],
                              "y": [5, 2, 3],
                              "type": "bar",
                              "name": "SF",
                          },
                          {
                              "x": [11, 22, 33],
                              "y": [22, 44, 55],
                              "type": "bar",
                              "name": "Montréal",
                          },
                      ],
                      "layout": {"title": "Dash Data Visualization"},
                  },
              ),
              html.Div(id="restyle-data"),
              html.Div(id="relayout-data"),
          ]
      )
  
      @app.callback(
          Output("restyle-data", "children"),
          [Input("example-graph", "restyleData")],
      )
      def show_restyle_data(data):
          if data is None:  # ignore initial
              return ""
          return json.dumps(data)
  
      @app.callback(
          Output("relayout-data", "children"),
          [Input("example-graph", "relayoutData")],
      )
      def show_relayout_data(data):
          if (
              data is None or "autosize" in data
          ):  # ignore initial & auto width
              return ""
          return json.dumps(data)
  
      dash_dcc.start_server(app)
  
      time.sleep(1)
  
      # use this opportunity to test restyleData, since there are multiple
      # traces on this graph
      legendToggle = dash_dcc.find_element(
          "#example-graph .traces:first-child .legendtoggle"
      )
      legendToggle.click()
      dash_dcc.wait_for_text_to_equal(
          "#restyle-data", '[{"visible": ["legendonly"]}, [0]]'
      )
  
      is_eager = "eager" if is_eager else "lazy"
  
      # move snapshot after click, so it's more stable with the wait
      dash_dcc.percy_snapshot(
          f"2 graphs with different figures ({is_eager})"
      )
  
      # and test relayoutData while we're at it
      autoscale = dash_dcc.find_element("#example-graph .ewdrag")
      autoscale.click()
      autoscale.click()
      dash_dcc.wait_for_text_to_equal(
          "#relayout-data", '{"xaxis.autorange": true}'
      )
  
      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 2 for calling a global function with example usage: test_grva002_graphs_with_different_figures(dash_dcc, is_eager) and returns: json, json, str, str