docstr: @param transforms: a list of transforms to select from; one of which will
      be chosen to be applied to the text
  
  @param p: the probability of the transform being applied; default value is 1.0
docstr_tok: ["@","param","transforms",":","a","list","of","transforms","to","select","from",";","one","of","which","will","be","chosen","to","be","applied","to","the","text","@","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 to select from; one of which will
          be chosen to be applied to the text
  
      @param p: the probability of the transform being applied; default value is 1.0
      """
      super().__init__(transforms, p)
      transform_probs = [t.p for t in transforms]
      probs_sum = sum(transform_probs)
      self.transform_probs = [t / probs_sum for t in transform_probs]
  
file_path: AugLy/augly/text/composition.py
imports: import random
  from typing import Any, Dict, List, Optional, Union
  from augly.text.transforms import BaseTransform
label_desc: Use image node_id 1 to create a new OneOf object from inherited base classes: BaseComposition with example: obj = OneOf(transforms, p)