class_docstr: Random rotate image between two rotation angles with a random probability.
  
  Attributes:
      prob:
          Probability with which image is rotated.
      degrees:
          Range of degrees to select from. If degrees is a number instead of a sequence like (min, max),
          the range of degrees will be (-degrees, +degrees). The image is rotated counter-clockwise with
          a random angle in the (min, max) range or in the (-degrees, +degrees) range.
class_docstr_tok: ["Random","rotate","image","between","two","rotation","angles","with","a","random","probability",".","Attributes",":","prob",":","Probability","with","which","image","is","rotated",".","degrees",":","Range","of","degrees","to","select","from",".","If","degrees","is","a","number","instead","of","a","sequence","like","(","min",",","max",")",",","the","range","of","degrees","will","be","(","-degrees",",","+degrees",")",".","The","image","is","rotated","counter-clockwise","with","a","random","angle","in","the","(","min",",","max",")","range","or","in","the","(","-degrees",",","+degrees",")","range","."]
docstr: Rotates the images with a given probability.
  
  Args:
      image:
          PIL image or tensor which will be rotated.
  
  Returns:
      Rotated image or original image.
docstr_tok: ["Rotates","the","images","with","a","given","probability",".","Args",":","image",":","PIL","image","or","tensor","which","will","be","rotated",".","Returns",":","Rotated","image","or","original","image","."]
code: def __call__(
      self, image: Union[Image, Tensor]
  ) -> Union[Image, Tensor]:
      """Rotates the images with a given probability.
  
      Args:
          image:
              PIL image or tensor which will be rotated.
  
      Returns:
          Rotated image or original image.
  
      """
      return self.transform(image)
  
file_path: lightly/lightly/transforms/rotation.py
imports: from typing import Tuple, Union
  import numpy
  import torchvision.transforms
  from PIL.Image import Image
  from torch import Tensor
  from torchvision.transforms import functional
label_desc: Use image node_id 2 for calling the RandomRotateDegrees obj's underlying member method code with example usage: obj.__call__(image) and returns: self