code: def autocov(x, lag=1):
      
  
      if not lag:
          return 1
      if lag < 0:
          return
      return cov(x[:-lag], x[lag:], bias=1)
docs: Sample autocovariance at specified lag.
      The autocovariance is a 2x2 matrix with the variances of
      x[:-lag] and x[lag:] in the diagonal and the autocovariance
      on the off-diagonal.