code: def random_pitch_shift(
      spectrogram: tf.Tensor,
      shift_min: float = -1.0,
      shift_max: float = 1.0,
      **kwargs,
  ) -> tf.Tensor:
      """
      Pitch shift a spectrogram preserving shape with random ratio in
      tensorflow. Applies pitch_shift to spectrogram with a random shift
      amount (expressed in semitones) drawn uniformly in
      `[shift_min, shift_max]`.
  
      Parameters:
          spectrogram (tf.Tensor):
              Input spectrogram to be pitch shifted as tensor.
          shift_min (float):
              (Optional) Min pitch shift in semitone, default to -1.
          shift_max (float):
              (Optional) Max pitch shift in semitone, default to 1.
  
      Returns:
          tf.Tensor:
              Randomly pitch shifted spectrogram (same shape as spectrogram).
      """
      semitone_shift = (
          tf.random_uniform(shape=(1,), seed=0)
          * (shift_max - shift_min)
          + shift_min
      )
      return pitch_shift(
          spectrogram, semitone_shift=semitone_shift, **kwargs
      )
  
imports: import tensorflow
  from tensorflow.signal import hann_window, stft
label_desc: Use image node_id 5 for calling a global function with example usage: random_pitch_shift(spectrogram, shift_min, shift_max) and returns: pitch_shift