code: def dpss_windows(
      N, half_nbw, Kmax, *, sym=True, norm=None, low_bias=True
  ):
      """Compute Discrete Prolate Spheroidal Sequences.
  
      Will give of orders [0,Kmax-1] for a given frequency-spacing multiple
      NW and sequence length N.
  
      .. note:: Copied from NiTime.
  
      Parameters
      ----------
      N : int
          Sequence length.
      half_nbw : float
          Standardized half bandwidth corresponding to 2 * half_bw = BW*f0
          = BW*N/dt but with dt taken as 1.
      Kmax : int
          Number of DPSS windows to return is Kmax (orders 0 through Kmax-1).
      sym : bool
          Whether to generate a symmetric window (``True``, for filter design) or
          a periodic window (``False``, for spectral analysis). Default is
          ``True``.
  
          .. versionadded:: 1.3
      norm : 2 | ``'approximate'`` | ``'subsample'`` | None
          Window normalization method. If ``'approximate'`` or ``'subsample'``,
          windows are normalized by the maximum, and a correction scale-factor
          for even-length windows is applied either using
          ``N**2/(N**2+half_nbw)`` ("approximate") or a FFT-based subsample shift
          ("subsample"). ``2`` uses the L2 norm. ``None`` (the default) uses
          ``"approximate"`` when ``Kmax=None`` and ``2`` otherwise.
  
          .. versionadded:: 1.3
      low_bias : bool
          Keep only tapers with eigenvalues > 0.9.
  
      Returns
      -------
      v, e : tuple,
          The v array contains DPSS windows shaped (Kmax, N).
          e are the eigenvalues.
  
      Notes
      -----
      Tridiagonal form of DPSS calculation from :footcite:`Slepian1978`.
  
      References
      ----------
      .. footbibliography::
      """
      dpss, eigvals = sp_dpss(
          N, half_nbw, Kmax, sym=sym, norm=norm, return_ratios=True
      )
      if low_bias:
          idx = eigvals > 0.9
          if not idx.any():
              warn(
                  "Could not properly use low_bias, keeping lowest-bias taper"
              )
              idx = [np.argmax(eigvals)]
          dpss, eigvals = dpss[idx], eigvals[idx]
      assert len(dpss) > 0  # should never happen
      assert dpss.shape[1] == N  # old nitime bug
      return dpss, eigvals
  
file_path: mne-python/mne/time_frequency/multitaper.py
imports: import numpy
  from scipy.fft import rfft, rfftfreq
  from scipy.integrate import trapezoid
  from scipy.signal import get_window
  from scipy.signal.windows import dpss
  from ..parallel import parallel_func
  from ..utils import _check_option, logger, verbose, warn
label_desc: Use image node_id 1 for calling a global function with example usage: dpss_windows(N, half_nbw, Kmax) and returns: dpss,  eigvals