code: def _check_window_params(data, window_length):
      
      if window_length < 1:
          raise WindowLengthNotPositive(window_length=window_length)
  
      if window_length > data.shape[0]:
          raise WindowLengthTooLong(
              nrows=data.shape[0],
              window_length=window_length,
          )
docs: Check that a window of length `window_length` is well-defined on `data`.
  
      Parameters
      ----------
      data : np.ndarray[ndim=2]
          The array of data to check.
      window_length : int
          Length of the desired window.
  
      Returns
      -------
      None
  
      Raises
      ------
      WindowLengthNotPositive
          If window_length < 1.
      WindowLengthTooLong
          If window_length is greater than the number of rows in `data`.