code: def construct_display_graph(
      n, exp, n_added_graphs
  ) -> FigureResampler:
      # Figure construction logic based on state variables
      x = np.arange(n)
      expansion_scaling = exp**x
      y = (
          np.sin(x / 200) * expansion_scaling
          + np.random.randn(n) / 10 * expansion_scaling
      )
  
      fr = FigureResampler(go.Figure(), verbose=True)
      fr.add_trace(go.Scattergl(name="sin"), hf_x=x, hf_y=y)
      fr.update_layout(
          height=350,
          showlegend=True,
          legend=dict(orientation="h", y=1.12, xanchor="right", x=1),
          template="plotly_white",
          title=f"graph {n_added_graphs} - n={n:,} pow={exp}",
          title_x=0.5,
      )
  
      return fr, Serverside(fr)
  
file_path: plotly-resampler/examples/dash_apps/11_sine_generator.py
imports: from uuid import uuid4
  import dash_bootstrap_components
  import numpy
  import plotly.graph_objects
  from dash import MATCH, Input, Output, State, callback_context, dcc, html, no_update
  from dash_extensions.enrich import DashProxy, Serverside, ServersideOutputTransform, Trigger, TriggerTransform
  from plotly_resampler import FigureResampler
label_desc: Use image node_id 2 for calling a global function with example usage: construct_display_graph(n, exp, n_added_graphs) and returns: fr,  Serverside