code: def test_right_number_of_transforms_applied(self):
      random.seed(23)
      samples = np.array([0.25, 0.0, 0.1, -0.4], dtype=np.float32)
      sample_rate = 44100
      num_transforms_applied_list = []
      num_runs = 30
      list_transforms = [
          Gain(min_gain_db=-12, max_gain_db=-6, p=1.0),
          PolarityInversion(p=1.0),
      ]
      augmenter = SomeOf(1, list_transforms)
  
      for _ in range(num_runs):
          perturbed_samples = augmenter(
              samples=samples, sample_rate=sample_rate
          )
          was_gain_applied = 0.0 < abs(perturbed_samples[0]) < 0.25
          was_polarity_inversion_applied = perturbed_samples[0] < 0.0
          num_transforms_applied = sum(
              [
                  1 if was_gain_applied else 0,
                  1 if was_polarity_inversion_applied else 0,
              ]
          )
          num_transforms_applied_list.append(num_transforms_applied)
      assert np.mean(num_transforms_applied_list) == 1
  
file_path: audiomentations/tests/test_some_of.py
imports: import os
  import random
  import numpy
  import pytest
  from numpy.testing import assert_array_equal, assert_array_almost_equal
  from audiomentations import ClippingDistortion, AddBackgroundNoise, TimeMask, Shift, PolarityInversion, Gain, SpecFrequencyMask, SomeOf
  from demo.demo import DEMO_DIR
label_desc: Use image node_id 1 for calling the TestSomeOf obj's underlying member method code with example usage: obj.test_right_number_of_transforms_applied() without return types