docstr: Args:
      img (PIL Image or Tensor): Input image.
  
  Returns:
      PIL Image or Tensor: Color jittered image.
docstr_tok: ["Args",":","img","(","PIL","Image","or","Tensor",")",":","Input","image",".","Returns",":","PIL","Image","or","Tensor",":","Color","jittered","image","."]
code: def forward(self, img):
      """
      Args:
          img (PIL Image or Tensor): Input image.
  
      Returns:
          PIL Image or Tensor: Color jittered image.
      """
      (
          fn_idx,
          brightness_factor,
          contrast_factor,
          saturation_factor,
          hue_factor,
      ) = self.get_params(
          self.brightness, self.contrast, self.saturation, self.hue
      )
  
      for fn_id in fn_idx:
          if fn_id == 0 and brightness_factor is not None:
              img = adjust_brightness(img, brightness_factor)
          elif fn_id == 1 and contrast_factor is not None:
              img = adjust_contrast(img, contrast_factor)
          elif fn_id == 2 and saturation_factor is not None:
              img = adjust_saturation(img, saturation_factor)
          elif fn_id == 3 and hue_factor is not None:
              img = adjust_hue(img, hue_factor)
  
      return img
  
imports: import math
  import numbers
  import warnings
  from enum import Enum
  from typing import Any
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Sequence
  from typing import Tuple
  from typing import Union
  import paddle
  import paddle.nn
  from paddle import Tensor
  from paddle.nn import functional
  from paddle.nn.functional import grid_sample
  from paddle.vision import transforms
label_desc: Use image node_id 4 for calling the ColorJitter obj's underlying member method code with example usage: obj.forward(img) and returns: img