docstr: @param transforms: a list of transforms
  
  @param p: the probability of the transform being applied; default value is 1.0
docstr_tok: ["@","param","transforms",":","a","list","of","transforms","@","param","p",":","the","probability","of","the","transform","being","applied",";","default","value","is","1.0"]
code: def __init__(self, transforms: List[BaseTransform], p: float = 1.0):
      """
      @param transforms: a list of transforms
  
      @param p: the probability of the transform being applied; default value is 1.0
      """
      for transform in transforms:
          assert isinstance(
              transform, (BaseTransform, BaseComposition)
          ), "Expected instances of type `BaseTransform` or `BaseComposition` for variable `transforms`"  # noqa: B950
      assert 0 <= p <= 1.0, "p must be a value in the range [0, 1]"
  
      self.transforms = transforms
      self.p = p
  
file_path: AugLy/augly/audio/composition.py
imports: import random
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  from augly.audio.transforms import BaseTransform
label_desc: Use image node_id 1 to create a new BaseComposition object  with example: obj = BaseComposition(transforms, p)