docstr: Check that an MDCT window satisfies necessary conditions.
docstr_tok: ["Check","that","an","MDCT","window","satisfies","necessary","conditions","."]
code: def _check_mdct_window(self, window, tol=1e-6):
      """Check that an MDCT window satisfies necessary conditions."""
      # We check that the length of the window is a multiple of 4 and
      # for symmetry of the window and also Princen-Bradley condition which
      # requires that  w[n]^2 + w[n + N//2]^2 = 1 for an N length window.
      wlen = int(np.shape(window)[0])
      assert wlen % 4 == 0
      half_len = wlen // 2
      squared_sums = window[:half_len] ** 2 + window[half_len:] ** 2
      self.assertAllClose(squared_sums, np.ones((half_len,)), tol, tol)
      sym_diff = window[:half_len] - window[-1 : half_len - 1 : -1]
      self.assertAllClose(sym_diff, np.zeros((half_len,)), tol, tol)
  
imports: import functools
  import itertools
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import context
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.kernel_tests.signal import test_util
  from tensorflow.python.ops.signal import window_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the WindowOpsTest obj's underlying member method code with example usage: obj._check_mdct_window(window, tol) without return types