docstr: Window functions should be constant foldable for constant inputs.
docstr_tok: ["Window","functions","should","be","constant","foldable","for","constant","inputs","."]
code: def test_constant_folding(self, window_fn, periodic, tf_dtype_tol):
      """Window functions should be constant foldable for constant inputs."""
      if context.executing_eagerly():
          return
      g = ops.Graph()
      with g.as_default():
          try:
              window = window_fn(
                  100, periodic=periodic, dtype=tf_dtype_tol[0]
              )
          except TypeError:
              window = window_fn(100, dtype=tf_dtype_tol[0])
          rewritten_graph = test_util.grappler_optimize(g, [window])
          self.assertLen(rewritten_graph.node, 1)
  
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 6 for calling the WindowOpsTest obj's underlying member method code with example usage: obj.test_constant_folding(window_fn, periodic, tf_dtype_tol) without return types