class_docstr: Apply Solarization to the PIL image.
class_docstr_tok: ["Apply","Solarization","to","the","PIL","image","."]
code: def __call__(self, img):
      if random.random() < self.p:
          return ImageOps.solarize(img)
      else:
          return img
  
imports: import random
  import numpy
  import torch
  from PIL import Image, ImageFilter, ImageOps
  from torch.utils.data import Dataset
  from nemo.collections.multimodal.data.common.data_samplers import SharedEpoch
  from nemo.collections.vision.data.megatron.autoaugment import ImageNetPolicy
  from nemo.collections.vision.data.megatron.image_folder import ImageFolder
label_desc: Use image node_id 2 for calling the Solarization obj's underlying member method code with example usage: obj.__call__(img) and returns: ImageOps, img