class_docstr: Apply a constant amount of gain to match a specific loudness (in LUFS). This is an
  implementation of ITU-R BS.1770-4.
  
  For an explanation on LUFS, see https://en.wikipedia.org/wiki/LUFS
  
  See also the following web pages for more info on audio loudness normalization:
      https://github.com/csteinmetz1/pyloudnorm
      https://en.wikipedia.org/wiki/Audio_normalization
  
  Warning: This transform can return samples outside the [-1, 1] range, which may lead to
  clipping or wrap distortion, depending on what you do with the audio in a later stage.
  See also https://en.wikipedia.org/wiki/Clipping_(audio)#Digital_clipping
code: def randomize_parameters(
      self, samples: NDArray[np.float32], sample_rate: int
  ):
      try:
          import pyloudnorm
      except ImportError:
          print(
              (
                  "Failed to import pyloudnorm. Maybe it is not installed? "
                  "To install the optional pyloudnorm dependency of audiomentations,"
                  " do `pip install audiomentations[extras]` or simply "
                  " `pip install pyloudnorm`"
              ),
              file=sys.stderr,
          )
          raise
  
      super().randomize_parameters(samples, sample_rate)
      if self.parameters["should_apply"]:
          meter = pyloudnorm.Meter(sample_rate)  # create BS.1770 meter
          # transpose because pyloudnorm expects shape like (smp, chn), not (chn, smp)
          self.parameters["loudness"] = meter.integrated_loudness(
              samples.transpose()
          )
          self.parameters["lufs"] = float(
              random.uniform(self.min_lufs, self.max_lufs)
          )
  
file_path: audiomentations/audiomentations/augmentations/loudness_normalization.py
imports: import random
  import warnings
  import numpy
  import sys
  from numpy.typing import NDArray
  from audiomentations.core.transforms_interface import BaseWaveformTransform
label_desc: Use image node_id 2 for calling the LoudnessNormalization obj's underlying member method code with example usage: obj.randomize_parameters(samples, sample_rate) without return types