code: def calculate_auc(values: np.array, dx: int = 1):
      """
      Calculate area under the curve using the composite trapezoidal rule.
  
      Parameters
      ----------
      values: np.ndarray
           Input array.
      dx: integer
          The spacing between sample points. The default is 1.
  
      Returns
      -------
      np.ndarray
          Definite integral of values.
      """
      return np.trapz(np.array(values), dx=dx)
  
imports: import copy
  import re
  from importlib import util
  from typing import Any, Dict, Optional, Sequence, Tuple, Union, List, TypeVar
  import numpy
  from skimage.segmentation import slic, felzenszwalb
  from quantus.helpers import asserts
  from quantus.helpers.model.model_interface import ModelInterface
label_desc: Use image node_id 21 for calling a global function with example usage: calculate_auc(values, dx) and returns: np