code: def wrap_aggregate(
      hf_x: np.ndarray | None = None,
      hf_y: pd.Series | np.ndarray = None,
      downsampler: DataPointSelector | DataAggregator = None,
      gap_handler: AbstractGapHandler = None,
      n_out: int = None,
  ) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
      hf_trace_data = construct_hf_data_dict(
          **{
              "hf_x": hf_x,
              "hf_y": hf_y,
              "downsampler": downsampler,
              "gap_handler": gap_handler,
              "max_n_samples": n_out,
          }
      )
      return PlotlyAggregatorParser.aggregate(
          hf_trace_data, 0, len(hf_y)
      )
  
file_path: plotly-resampler/tests/utils.py
imports: from __future__ import annotations
  import sys
  import numpy
  import pandas
  from plotly_resampler.aggregation import MedDiffGapHandler, MinMaxLTTB
  from plotly_resampler.aggregation.aggregation_interface import DataAggregator, DataPointSelector
  from plotly_resampler.aggregation.gap_handler_interface import AbstractGapHandler
  from plotly_resampler.aggregation.plotly_aggregator_parser import PlotlyAggregatorParser
label_desc: Use image node_id 3 for calling a global function with example usage: wrap_aggregate(hf_x, hf_y, downsampler, gap_handler, n_out) and returns: PlotlyAggregatorParser