class_docstr: Randomly change the brightness, contrast and saturation of an image.
  
  Args:
      brightness (float): How much to jitter brightness. brightness_factor
          is chosen uniformly from [max(0, 1 - brightness), 1 + brightness].
      contrast (float): How much to jitter contrast. contrast_factor
          is chosen uniformly from [max(0, 1 - contrast), 1 + contrast].
      saturation (float): How much to jitter saturation. saturation_factor
          is chosen uniformly from [max(0, 1 - saturation), 1 + saturation].
      hue(float): How much to jitter hue. hue_factor is chosen uniformly from
          [-hue, hue]. Should be >=0 and <= 0.5.
class_docstr_tok: ["Randomly","change","the","brightness",",","contrast","and","saturation","of","an","image",".","Args",":","brightness","(","float",")",":","How","much","to","jitter","brightness",".","brightness_factor","is","chosen","uniformly","from","[","max","(","0",",","1","-","brightness",")",",","1","+","brightness","]",".","contrast","(","float",")",":","How","much","to","jitter","contrast",".","contrast_factor","is","chosen","uniformly","from","[","max","(","0",",","1","-","contrast",")",",","1","+","contrast","]",".","saturation","(","float",")",":","How","much","to","jitter","saturation",".","saturation_factor","is","chosen","uniformly","from","[","max","(","0",",","1","-","saturation",")",",","1","+","saturation","]",".","hue","(","float",")",":","How","much","to","jitter","hue",".","hue_factor","is","chosen","uniformly","from","[","-hue",",","hue","]",".","Should","be",">","=0","and","<","=","0.5","."]
docstr: Get a randomized transform to be applied on image.
  
  Arguments are same as that of __init__.
  
  Returns:
      Transform which randomly adjusts brightness, contrast and
      saturation in a random order.
docstr_tok: ["Get","a","randomized","transform","to","be","applied","on","image",".","Arguments","are","same","as","that","of","__init__",".","Returns",":","Transform","which","randomly","adjusts","brightness",",","contrast","and","saturation","in","a","random","order","."]
code: def get_params(brightness, contrast, saturation, hue):
      """Get a randomized transform to be applied on image.
  
      Arguments are same as that of __init__.
  
      Returns:
          Transform which randomly adjusts brightness, contrast and
          saturation in a random order.
      """
      transforms = []
      if brightness > 0:
          brightness_factor = np.random.uniform(
              max(0, 1 - brightness), 1 + brightness
          )
          transforms.append(
              torch_tr.Lambda(
                  lambda img: adjust_brightness(img, brightness_factor)
              )
          )
  
      if contrast > 0:
          contrast_factor = np.random.uniform(
              max(0, 1 - contrast), 1 + contrast
          )
          transforms.append(
              torch_tr.Lambda(
                  lambda img: adjust_contrast(img, contrast_factor)
              )
          )
  
      if saturation > 0:
          saturation_factor = np.random.uniform(
              max(0, 1 - saturation), 1 + saturation
          )
          transforms.append(
              torch_tr.Lambda(
                  lambda img: adjust_saturation(img, saturation_factor)
              )
          )
  
      if hue > 0:
          hue_factor = np.random.uniform(-hue, hue)
          transforms.append(
              torch_tr.Lambda(lambda img: adjust_hue(img, hue_factor))
          )
  
      np.random.shuffle(transforms)
      transform = torch_tr.Compose(transforms)
  
      return transform
  
imports: import random
  import os
  import math
  import mmcv
  import torch
  import numpy
  import torchvision.transforms
  from torchvision import datasets
  from torch.utils.data import Dataset
  from megatron import print_rank_0
  from megatron import get_args
  from PIL import Image, ImageOps, ImageEnhance
  import torchvision.transforms
label_desc: Use image node_id 2 for calling the ColorJitter obj's underlying member method code with example usage: obj.get_params(brightness, contrast, saturation, hue) and returns: transform