code: def exponential_weights(length, decay_rate):
      """
      Build a weight vector for an exponentially-weighted statistic.
  
      The resulting ndarray is of the form::
  
          [decay_rate ** length, ..., decay_rate ** 2, decay_rate]
  
      Parameters
      ----------
      length : int
          The length of the desired weight vector.
      decay_rate : float
          The rate at which entries in the weight vector increase or decrease.
  
      Returns
      -------
      weights : ndarray[float64]
      """
      return full(length, decay_rate, float64_dtype) ** arange(
          length + 1, 1, -1
      )
  
imports: from numbers import Number
  from numpy import arange, average, clip, copyto, exp, fmax, full, isnan, log, NINF, sqrt, sum, unique
  from zipline.pipeline.data import EquityPricing
  from zipline.utils.input_validation import expect_types
  from zipline.utils.math_utils import nanargmax, nanmax, nanmean, nanstd, nansum
  from zipline.utils.numpy_utils import float64_dtype, ignore_nanwarnings
  from .factor import CustomFactor
  from ..mixins import SingleInputMixin
label_desc: Use image node_id 1 for calling a global function with example usage: exponential_weights(length, decay_rate) and returns: unknown