code: def _register_wrapper(
      module: type,
      constr_name: str,
      pr_class: AbstractFigureAggregator,
      **aggregator_kwargs,
  ):
      constr = getattr(module, constr_name)
      constr = _get_plotly_constr(
          constr
      )  # get the original plotly constructor
  
      # print(f"Wrapping {constr_name} with {pr_class}")
  
      @wraps(constr)
      def wrapped_constr(*args, **kwargs):
          # print(f"Executing constructor wrapper for {constr_name}", constr)
          return pr_class(constr(*args, **kwargs), **aggregator_kwargs)
  
      wrapped_constr.__name__ = WRAPPED_PREFIX + constr_name
      setattr(module, constr_name, wrapped_constr)
  
file_path: plotly-resampler/plotly_resampler/registering.py
imports: from functools import wraps
  import plotly
  from plotly_resampler import FigureResampler, FigureWidgetResampler
  from plotly_resampler.figure_resampler.figure_resampler_interface import AbstractFigureAggregator
label_desc: Use image node_id 4 for calling a global function with example usage: _register_wrapper(module, constr_name, pr_class) and returns: pr_class