docstr: Test that upsample_with_windows() disallows inputs that are not 3-D.
  
  Args:
    dimensions: The number of dimensions of the input test signal.
docstr_tok: ["Test","that","upsample_with_windows","(",")","disallows","inputs","that","are","not","3-D.","Args",":","dimensions",":","The","number","of","dimensions","of","the","input","test","signal","."]
code: def test_window_only_allows_3d_inputs(self, dimensions):
      """Test that upsample_with_windows() disallows inputs that are not 3-D.
  
      Args:
        dimensions: The number of dimensions of the input test signal.
      """
      # Create test signal.
      inputs_shape = [self.n_smaller] * dimensions
      inputs = np.ones(inputs_shape)
  
      # Run through the resampling op.
      if dimensions != 3:
          with self.assertRaises(ValueError):
              outputs = core.upsample_with_windows(
                  inputs, self.n_larger
              )
      else:
          outputs = core.upsample_with_windows(inputs, self.n_larger)
          outputs_shape = [
              self.n_smaller,
              self.n_larger,
              self.n_smaller,
          ]
          self.assertListEqual(list(outputs.shape), outputs_shape)
  
imports: from absl.testing import parameterized
  from ddsp import core
  import librosa
  import numpy
  from scipy import signal
  import tensorflow.compat.v2
label_desc: Use image node_id 3 for calling the ResampleTest obj's underlying member method code with example usage: obj.test_window_only_allows_3d_inputs(dimensions) without return types