code: def random_rotation_transform(
      rr_prob: float,
      rr_degrees: Union[None, float, Tuple[float, float]],
  ) -> Union[RandomRotate, T.RandomApply]:
      if rr_degrees is None:
          # Random rotation by 90 degrees.
          return RandomRotate(prob=rr_prob, angle=90)
      else:
          # Random rotation with random angle defined by rr_degrees.
          return RandomRotateDegrees(prob=rr_prob, degrees=rr_degrees)
  
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 1 for calling a global function with example usage: random_rotation_transform(rr_prob, rr_degrees) and returns: RandomRotate, RandomRotateDegrees