docstr: Verify that ``T.TimeStretch`` does not fail if it's not close to 0
  
  ``T.TimeStrech`` is not differentiable around 0, so this test checks the differentiability
  for cases where input is not zero.
  
  As tested above, when spectrogram contains values close to zero, the gradients are unstable
  and gradcheck fails.
  
  In this test, we generate spectrogram from random signal, then we push the points around
  zero away from the origin.
  
  This process does not reflect the real use-case, and it is not practical for users, but
  this helps us understand to what degree the function is differentiable and when not.
docstr_tok: ["Verify","that","``","T.TimeStretch","``","does","not","fail","if","it","'s","not","close","to","0","``","T.TimeStrech","``","is","not","differentiable","around","0",",","so","this","test","checks","the","differentiability","for","cases","where","input","is","not","zero",".","As","tested","above",",","when","spectrogram","contains","values","close","to","zero",",","the","gradients","are","unstable","and","gradcheck","fails",".","In","this","test",",","we","generate","spectrogram","from","random","signal",",","then","we","push","the","points","around","zero","away","from","the","origin",".","This","process","does","not","reflect","the","real","use-case",",","and","it","is","not","practical","for","users",",","but","this","helps","us","understand","to","what","degree","the","function","is","differentiable","and","when","not","."]
code: def test_timestretch_non_zero(self, rate):
      """Verify that ``T.TimeStretch`` does not fail if it's not close to 0
  
      ``T.TimeStrech`` is not differentiable around 0, so this test checks the differentiability
      for cases where input is not zero.
  
      As tested above, when spectrogram contains values close to zero, the gradients are unstable
      and gradcheck fails.
  
      In this test, we generate spectrogram from random signal, then we push the points around
      zero away from the origin.
  
      This process does not reflect the real use-case, and it is not practical for users, but
      this helps us understand to what degree the function is differentiable and when not.
      """
      n_fft = 16
      transform = T.TimeStretch(n_freq=n_fft // 2 + 1, fixed_rate=rate)
      waveform = get_whitenoise(
          sample_rate=40, duration=1, n_channels=2
      )
      spectrogram = get_spectrogram(waveform, n_fft=n_fft, power=None)
  
      # 1e-3 is too small (on CPU)
      epsilon = 2e-2
      too_close = spectrogram.abs() < epsilon
      spectrogram[too_close] = (
          epsilon
          * spectrogram[too_close]
          / spectrogram[too_close].abs()
      )
      self.assert_grad(transform, [spectrogram])
  
imports: import unittest
  from typing import List
  import torch
  import torchaudio.transforms
  from parameterized import parameterized
  from torch.autograd import gradcheck, gradgradcheck
  from torchaudio_unittest.common_utils import get_spectrogram, get_whitenoise, nested_params, rnnt_utils, TestBaseMixin
label_desc: Use image node_id 20 for calling the AutogradTestMixin obj's underlying member method code with example usage: obj.test_timestretch_non_zero(rate) without return types