code: def scale_sfs_folded(s, n):
      
      k = np.arange(s.shape[0])
      out = s * k * (n - k) / n
      return out
docs: Scale a folded site frequency spectrum.
  
      Parameters
      ----------
      s : array_like, int, shape (n_chromosomes//2,)
          Folded site frequency spectrum.
      n : int
          Number of chromosomes called.
  
      Returns
      -------
      sfs_folded_scaled : ndarray, int, shape (n_chromosomes//2,)
          Scaled folded site frequency spectrum.