docstr: @param texts: a string or a list of text documents to be augmented
  
  @param force: if set to True, the transform will be applied. Otherwise,
      application is determined by the probability set
  
  @param seed: if provided, the random seed will be set to this before calling
      the transform
  
  @param metadata: if set to be a list, metadata about the function execution
      including its name, the source & dest length, etc. will be appended to
      the inputted list. If set to None, no metadata will be appended or returned
  
  @returns: the list of augmented text documents
docstr_tok: ["@","param","texts",":","a","string","or","a","list","of","text","documents","to","be","augmented","@","param","force",":","if","set","to","True",",","the","transform","will","be","applied",".","Otherwise",",","application","is","determined","by","the","probability","set","@","param","seed",":","if","provided",",","the","random","seed","will","be","set","to","this","before","calling","the","transform","@","param","metadata",":","if","set","to","be","a","list",",","metadata","about","the","function","execution","including","its","name",",","the","source","&","dest","length",",","etc",".","will","be","appended","to","the","inputted","list",".","If","set","to","None",",","no","metadata","will","be","appended","or","returned","@","returns",":","the","list","of","augmented","text","documents"]
code: def __call__(
      self,
      texts: Union[str, List[str]],
      force: bool = False,
      seed: Optional[int] = None,
      metadata: Optional[List[Dict[str, Any]]] = None,
  ) -> Union[str, List[str]]:
      """
      @param texts: a string or a list of text documents to be augmented
  
      @param force: if set to True, the transform will be applied. Otherwise,
          application is determined by the probability set
  
      @param seed: if provided, the random seed will be set to this before calling
          the transform
  
      @param metadata: if set to be a list, metadata about the function execution
          including its name, the source & dest length, etc. will be appended to
          the inputted list. If set to None, no metadata will be appended or returned
  
      @returns: the list of augmented text documents
      """
      if seed is not None:
          random.seed(seed)
  
      texts = [texts] if isinstance(texts, str) else texts
  
      if random.random() > self.p:
          return texts
  
      transform = random.choices(self.transforms, self.transform_probs)[
          0
      ]
      return transform(texts, force=True, metadata=metadata)
  
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 2 for calling the OneOf obj's underlying member method code with example usage: obj.__call__(texts, force, seed, metadata) and returns: transform, texts