code: def update_dynamic_fig(
      coarse_grained_relayout: dict | None,
      fine_grained_relayout: dict | None,
      fr_fig: FigureResampler,
  ):
      if fr_fig is None:  # When the figure does not exist -> do nothing
          return no_update
  
      ctx = callback_context
      trigger_id = ctx.triggered[0].get("prop_id", "").split(".")[0]
  
      if trigger_id == "plotly-resampler-graph":
          return fr_fig.construct_update_data_patch(
              fine_grained_relayout
          )
      elif trigger_id == "coarse-graph":
          return fr_fig.construct_update_data_patch(
              coarse_grained_relayout
          )
  
      return no_update
  
file_path: plotly-resampler/examples/dash_apps/13_coarse_fine.py
imports: from __future__ import annotations
  from pathlib import Path
  from typing import List
  import dash_bootstrap_components
  import plotly.graph_objects
  from dash import Input, Output, State, callback_context, dcc, html, no_update
  from dash_extensions.enrich import DashProxy, Serverside, ServersideOutputTransform
  from utils.callback_helpers import get_selector_states, multiple_folder_file_selector
  from utils.graph_construction import visualize_multiple_files
  from plotly_resampler import FigureResampler
label_desc: Use image node_id 3 for calling a global function with example usage: update_dynamic_fig(coarse_grained_relayout, fine_grained_relayout, fr_fig) and returns: no_update, no_update, fr_fig, fr_fig