code: def weights_bartlett(nlags):
      # with lag zero, nlags is the highest lag included
      return 1 - np.arange(nlags + 1) / (nlags + 1.0)
  
file_path: statsmodels/statsmodels/sandbox/panel/sandwich_covariance_generic.py
imports: import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: weights_bartlett(nlags) and returns: unknown