class_docstr: Definition of a SubPolicy.
  
  A SubPolicy consists of two augmentation operations,
  each of those parametrized as operation, probability, magnitude.
  The two operations are applied sequentially on the image upon call.
class_docstr_tok: ["Definition","of","a","SubPolicy",".","A","SubPolicy","consists","of","two","augmentation","operations",",","each","of","those","parametrized","as","operation",",","probability",",","magnitude",".","The","two","operations","are","applied","sequentially","on","the","image","upon","call","."]
docstr: Define call method for SubPolicy class.
docstr_tok: ["Define","call","method","for","SubPolicy","class","."]
code: def __call__(self, img):
      """Define call method for SubPolicy class."""
      # Randomly apply operation 1.
      if random.random() < self.probability1:
          img = self.operation1(img, self.magnitude1)
  
      # Randomly apply operation 2.
      if random.random() < self.probability2:
          img = self.operation2(img, self.magnitude2)
  
      return img
  
file_path: megatron-lm/megatron/data/autoaugment.py
imports: import random
  import numpy
  from PIL import Image
  from PIL import ImageEnhance
  from PIL import ImageOps
label_desc: Use image node_id 2 for calling the SubPolicy obj's underlying member method code with example usage: obj.__call__(img) and returns: img