code: def update_fig(relayoutdata: dict, fig: FigureResampler):
      if fig is None:
          return no_update
      return fig.construct_update_data_patch(relayoutdata)
  
imports: import numpy
  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 plotly_resampler import FigureResampler
  from plotly_resampler.aggregation import MinMaxLTTB
label_desc: Use image node_id 2 for calling a global function with example usage: update_fig(relayoutdata, fig) and returns: fig, no_update