code: def moving_tajima_d(ac, size, start=0, stop=None, step=None, min_sites=3):
      
  
      d = moving_statistic(values=ac, statistic=tajima_d, size=size, start=start, stop=stop,
                           step=step, min_sites=min_sites)
      return d
docs: Calculate the value of Tajima's D in moving windows of `size` variants.
  
  
      Parameters
      ----------
      ac : array_like, int, shape (n_variants, n_alleles)
          Allele counts array.
      size : int
          The window size (number of variants).
      start : int, optional
          The index at which to start.
      stop : int, optional
          The index at which to stop.
      step : int, optional
          The number of variants between start positions of windows. If not
          given, defaults to the window size, i.e., non-overlapping windows.
      min_sites : int, optional
          Minimum number of segregating sites for which to calculate a value. If
          there are fewer, np.nan is returned. Defaults to 3.
  
      Returns
      -------
      d : ndarray, float, shape (n_windows,)
          Tajima's D.
  
      Examples
      --------
  
      >>> import allel
      >>> g = allel.GenotypeArray([[[0, 0], [0, 0]],
      ...                          [[0, 0], [0, 1]],
      ...                          [[0, 0], [1, 1]],
      ...                          [[0, 1], [1, 1]],
      ...                          [[1, 1], [1, 1]],
      ...                          [[0, 0], [1, 2]],
      ...                          [[0, 1], [1, 2]],
      ...                          [[0, 1], [-1, -1]],
      ...                          [[-1, -1], [-1, -1]]])
      >>> ac = g.count_alleles()
      >>> D = allel.moving_tajima_d(ac, size=4, step=2)
      >>> D
      array([0.1676558 , 2.01186954, 5.70029703])