class_docstr: Implementation for TrivialAugment (https://arxiv.org/abs/2103.10158)
  Random sample one operation from all_transform
  Random a strength between [0, max_strength]
class_docstr_tok: ["Implementation","for","TrivialAugment","(","https",":","\/\/arxiv.org\/abs\/2103.10158",")","Random","sample","one","operation","from","all_transform","Random","a","strength","between","[","0",",","max_strength","]"]
docstr: Parameters
  ----------
  datatype
      Modality type, currently support "text" and "img"
  max_strength
      Max strength for augmentation operation.
  space
      Use to set augmentation space if specified in config. Text only for now.
docstr_tok: ["Parameters","--","--","--","--","--","datatype","Modality","type",",","currently","support","``","text","''","and","``","img","''","max_strength","Max","strength","for","augmentation","operation",".","space","Use","to","set","augmentation","space","if","specified","in","config",".","Text","only","for","now","."]
code: def __init__(self, datatype, max_strength, space=None) -> None:
      """
      Parameters
      ----------
      datatype
          Modality type, currently support "text" and "img"
      max_strength
          Max strength for augmentation operation.
      space
          Use to set augmentation space if specified in config. Text only for now.
      """
      self.max_strength = max_strength
      self.data_type = datatype
      if datatype == IMAGE:
          self.all_transform = set_image_augmentation_space()
      elif datatype == TEXT:
          download_nltk()
          self.all_transform = set_text_augmentation_space(space)
      else:
          raise NotImplementedError
      logger.debug(
          f"{self.data_type} augmentation space {self.all_transform}"
      )
  
imports: import logging
  import random
  import nltk
  from PIL import Image, ImageEnhance, ImageOps
  from ..constants import AUTOMM, IMAGE, TEXT
label_desc: Use image node_id 1 to create a new TrivialAugment object  with example: obj = TrivialAugment(datatype, max_strength, space)