code: def test_randomize_only_own_parameters(self):
      samples = 1.0 / np.arange(1, 21, dtype=np.float32)
      sample_rate = 44100
  
      augmenter = OneOf(
          [
              Gain(p=1.0),
              PolarityInversion(p=1.0),
          ]
      )
      augmenter.randomize_parameters(
          samples, sample_rate, apply_to_children=True
      )
      own_parameters_before = (
          augmenter.should_apply,
          augmenter.transform_index,
      )
  
      parameters = [
          transform.parameters for transform in augmenter.transforms
      ]
  
      own_parameters_changed = False
      for i in range(30):
          augmenter.randomize_parameters(
              samples, sample_rate, apply_to_children=False
          )
          if (
              augmenter.should_apply,
              augmenter.transform_index,
          ) != own_parameters_before:
              own_parameters_changed = True
              break
      assert own_parameters_changed
  
      # Check that the children's parameters are still the same
      for transform_parameters, transform in zip(
          parameters, augmenter.transforms
      ):
          assert transform_parameters == transform.parameters
          assert not transform.are_parameters_frozen
  
file_path: audiomentations/tests/test_one_of.py
imports: import os
  import numpy
  from numpy.testing import assert_array_equal, assert_array_almost_equal
  from audiomentations import ClippingDistortion, AddBackgroundNoise, TimeMask, Shift, PolarityInversion, Gain, SpecFrequencyMask, OneOf
  from demo.demo import DEMO_DIR
label_desc: Use image node_id 5 for calling the TestOneOf obj's underlying member method code with example usage: obj.test_randomize_only_own_parameters() without return types