docstr: Put values in [0, self.max_norm] or [-self.max_norm, self.max_norm]
docstr_tok: ["Put","values","in","[","0",",","self.max_norm","]","or","[","-self.max_norm",",","self.max_norm","]"]
code: def normalize(self, S):
      """Put values in [0, self.max_norm] or [-self.max_norm, self.max_norm]"""
      # pylint: disable=no-else-return
      S = S.copy()
      if self.signal_norm:
          # mean-var scaling
          if hasattr(self, "mel_scaler"):
              if S.shape[0] == self.num_mels:
                  return self.mel_scaler.transform(S.T).T
              elif S.shape[0] == self.fft_size / 2:
                  return self.linear_scaler.transform(S.T).T
              else:
                  raise RuntimeError(
                      " [!] Mean-Var stats does not match the given feature dimensions."
                  )
          # range normalization
          S -= (
              self.ref_level_db
          )  # discard certain range of DB assuming it is air noise
          S_norm = (S - self.min_level_db) / (-self.min_level_db)
          if self.symmetric_norm:
              S_norm = ((2 * self.max_norm) * S_norm) - self.max_norm
              if self.clip_norm:
                  S_norm = np.clip(
                      S_norm, -self.max_norm, self.max_norm
                  )  # pylint: disable=invalid-unary-operand-type
              return S_norm
          else:
              S_norm = self.max_norm * S_norm
              if self.clip_norm:
                  S_norm = np.clip(S_norm, 0, self.max_norm)
              return S_norm
      else:
          return S
  
imports: import librosa
  import soundfile
  import numpy
  import scipy.io.wavfile
  import scipy.signal
  from TTS.tts.utils.data import StandardScaler
label_desc: Use image node_id 4 for calling the AudioProcessor obj's underlying member method code with example usage: obj.normalize(S) and returns: S, S_norm, S_norm, self, self