code: def testPolar2Rect(self, shape):
      mag_np = 10 * np.random.rand(*shape)
      phase_np = np.pi * (2 * np.random.rand(*shape) - 1)
      rect_np = mag_np * np.cos(phase_np) + 1.0j * mag_np * np.sin(
          phase_np
      )
      mag_tf = tf.convert_to_tensor(mag_np)
      phase_tf = tf.convert_to_tensor(phase_np)
      with self.cached_session() as sess:
          rect_tf = sess.run(spectral_ops.polar2rect(mag_tf, phase_tf))
      self.assertAllClose(rect_np, rect_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 5 for calling the SpectralOpsTest obj's underlying member method code with example usage: obj.testPolar2Rect(shape) without return types