code: def testDiff(self, shape, axis):
      x_np = np.random.randn(*shape)
      x_tf = tf.convert_to_tensor(x_np)
      res_np = np.diff(x_np, axis=axis)
      with self.cached_session() as sess:
          res_tf = sess.run(spectral_ops.diff(x_tf, axis=axis))
      self.assertEqual(res_np.shape, res_tf.shape)
      self.assertAllClose(res_np, res_tf)
  
file_path: magenta/magenta/models/gansynth/lib/spectral_ops_test.py
imports: from absl.testing import parameterized
  from magenta.models.gansynth.lib import spectral_ops
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 3 for calling the SpectralOpsTest obj's underlying member method code with example usage: obj.testDiff(shape, axis) without return types