class_docstr: Randomly change the brightness, contrast, saturation and hue of an image or video.
  
  If the input is a :class:`torch.Tensor`, it is expected
  to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions.
  If img is PIL Image, mode "1", "I", "F" and modes with transparency (alpha channel) are not supported.
  
  Args:
      brightness (float or tuple of float (min, max)): How much to jitter brightness.
          brightness_factor is chosen uniformly from [max(0, 1 - brightness), 1 + brightness]
          or the given [min, max]. Should be non negative numbers.
      contrast (float or tuple of float (min, max)): How much to jitter contrast.
          contrast_factor is chosen uniformly from [max(0, 1 - contrast), 1 + contrast]
          or the given [min, max]. Should be non-negative numbers.
      saturation (float or tuple of float (min, max)): How much to jitter saturation.
          saturation_factor is chosen uniformly from [max(0, 1 - saturation), 1 + saturation]
          or the given [min, max]. Should be non negative numbers.
      hue (float or tuple of float (min, max)): How much to jitter hue.
          hue_factor is chosen uniformly from [-hue, hue] or the given [min, max].
          Should have 0<= hue <= 0.5 or -0.5 <= min <= max <= 0.5.
          To jitter hue, the pixel values of the input image has to be non-negative for conversion to HSV space;
          thus it does not work if you normalize your image to an interval with negative values,
          or use an interpolation that generates negative values before using this function.
class_docstr_tok: ["Randomly","change","the","brightness",",","contrast",",","saturation","and","hue","of","an","image","or","video",".","If","the","input","is","a",":","class",":","`","torch.Tensor","`",",","it","is","expected","to","have","[","...",",","1","or","3",",","H",",","W","]","shape",",","where","...","means","an","arbitrary","number","of","leading","dimensions",".","If","img","is","PIL","Image",",","mode","``","1","''",",","``","I","''",",","``","F","''","and","modes","with","transparency","(","alpha","channel",")","are","not","supported",".","Args",":","brightness","(","float","or","tuple","of","float","(","min",",","max",")",")",":","How","much","to","jitter","brightness",".","brightness_factor","is","chosen","uniformly","from","[","max","(","0",",","1","-","brightness",")",",","1","+","brightness","]","or","the","given","[","min",",","max","]",".","Should","be","non","negative","numbers",".","contrast","(","float","or","tuple","of","float","(","min",",","max",")",")",":","How","much","to","jitter","contrast",".","contrast_factor","is","chosen","uniformly","from","[","max","(","0",",","1","-","contrast",")",",","1","+","contrast","]","or","the","given","[","min",",","max","]",".","Should","be","non-negative","numbers",".","saturation","(","float","or","tuple","of","float","(","min",",","max",")",")",":","How","much","to","jitter","saturation",".","saturation_factor","is","chosen","uniformly","from","[","max","(","0",",","1","-","saturation",")",",","1","+","saturation","]","or","the","given","[","min",",","max","]",".","Should","be","non","negative","numbers",".","hue","(","float","or","tuple","of","float","(","min",",","max",")",")",":","How","much","to","jitter","hue",".","hue_factor","is","chosen","uniformly","from","[","-hue",",","hue","]","or","the","given","[","min",",","max","]",".","Should","have","0","<","=","hue","<","=","0.5","or","-0.5","<","=","min","<","=","max","<","=","0.5",".","To","jitter","hue",",","the","pixel","values","of","the","input","image","has","to","be","non-negative","for","conversion","to","HSV","space",";","thus","it","does","not","work","if","you","normalize","your","image","to","an","interval","with","negative","values",",","or","use","an","interpolation","that","generates","negative","values","before","using","this","function","."]
code: def _check_input(
      self,
      value: Optional[Union[float, Sequence[float]]],
      name: str,
      center: float = 1.0,
      bound: Tuple[float, float] = (0, float("inf")),
      clip_first_on_zero: bool = True,
  ) -> Optional[Tuple[float, float]]:
      if value is None:
          return None
  
      if isinstance(value, (int, float)):
          if value < 0:
              raise ValueError(
                  f"If {name} is a single number, it must be non negative."
              )
          value = [center - value, center + value]
          if clip_first_on_zero:
              value[0] = max(value[0], 0.0)
      elif (
          isinstance(value, collections.abc.Sequence)
          and len(value) == 2
      ):
          value = [float(v) for v in value]
      else:
          raise TypeError(
              f"{name}={value} should be a single number or a sequence with length 2."
          )
  
      if not bound[0] <= value[0] <= value[1] <= bound[1]:
          raise ValueError(
              f"{name} values should be between {bound}, but got {value}."
          )
  
      return (
          None
          if value[0] == value[1] == center
          else (float(value[0]), float(value[1]))
      )
  
imports: import collections.abc
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import torch
  from torchvision import transforms
  from torchvision.transforms.v2 import functional, Transform
  from ._transform import _RandomApplyTransform
  from ._utils import query_chw
label_desc: Use image node_id 3 for calling the ColorJitter obj's underlying member method code with example usage: obj._check_input(value, name, center, bound, clip_first_on_zero) and returns: unknown, None