code: def exponential_decay(X, y, decay_rate=0.999):
      r"""Generates an exponential decay by mapping input data `X`, `y` to a exponential decreasing range
      $w_{t-1} = decay\_rate * w_{t}$. The length of the decay is determined by the number of samples in `y`.
  
      !!! warning
          It is up to the user to sort the dataset appropriately.
  
      Parameters
      ----------
      X : array-like, shape=(n_samples, n_features,)
          Training data. Unused, present for API consistency by convention.
      y : array-like, shape=(n_samples,)
          Target values. Used to determine the number of samples in the decay.
      decay_rate : float, default=0.999
          The rate of decay.
  
      Returns
      -------
      np.ndarray, shape=(n_samples,)
          The decay values.
  
      Raises
      ------
      ValueError
          If `decay_rate` not between 0 and 1.
      """
  
      if decay_rate <= 0 or decay_rate >= 1:
          raise ValueError(
              f"`decay_rate` must be between 0. and 1., found {decay_rate}"
          )
      n_samples = y.shape[0]
      return decay_rate ** np.arange(n_samples, 0, -1)
  
imports: import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: exponential_decay(X, y, decay_rate) and returns: unknown