code: def linear_forgetting_weights(N, LF):
      assert N >= 0
      assert LF > 0
      if N == 0:
          return np.asarray([])
      if N < LF:
          return np.ones(N)
      ramp = np.linspace(1 / N, 1.0, num=N - LF)
      flat = np.ones(LF)
      weights = np.concatenate([ramp, flat], axis=0)
      assert weights.shape == (N,), (weights.shape, N)
      return weights
  
imports: import logging
  import time
  import numpy
  from scipy.special import erf
  from .None import pyll
  from .pyll import scope
  from .pyll.stochastic import implicit_stochastic
  from .base import miscs_to_idxs_vals
  from .base import miscs_update_idxs_vals
  from .None import rand
label_desc: Use image node_id 14 for calling a global function with example usage: linear_forgetting_weights(N, LF) and returns: weights, np, np