code: def _argmax_area(
      prev_x, prev_y, avg_next_x, avg_next_y, x_bucket, y_bucket
  ):
      """Vectorized triangular area argmax computation.
      Parameters
      ----------
      prev_x : float
          The previous selected point is x value.
      prev_y : float
          The previous selected point its y value.
      avg_next_x : float
          The x mean of the next bucket
      avg_next_y : float
          The y mean of the next bucket
      x_bucket : np.ndarray
          All x values in the bucket
      y_bucket : np.ndarray
          All y values in the bucket
      Returns
      -------
      int
          The index of the point with the largest triangular area.
      """
      return np.abs(
          x_bucket * (prev_y - avg_next_y)
          + y_bucket * (avg_next_x - prev_x)
          + (prev_x * avg_next_y - avg_next_x * prev_y)
      ).argmax()
  
file_path: holoviews/holoviews/operation/downsample.py
imports: import math
  from functools import partial
  import numpy
  import param
  from ..core import NdOverlay, Overlay
  from ..element.chart import Area
  from .resample import ResampleOperation1D
label_desc: Use image node_id 1 for calling a global function with example usage: _argmax_area(prev_x, prev_y, avg_next_x, avg_next_y, x_bucket, y_bucket) and returns: np