class_docstr: Anomaly generator of the DSR model. The anomaly is generated using a Perlin
  noise generator on the two quantized representations of an image. This generator
  is only used during the second phase of training! The third phase requires generating
  smudges over the input images.
  
  Args:
      p_anomalous (float, optional): Probability to generate an anomalous image.
code: def __init__(
      self,
      p_anomalous: float = 0.5,
  ):
      super().__init__()
  
      self.p_anomalous = p_anomalous
      self.rot = iaa.Sequential([iaa.Affine(rotate=(-90, 90))])
  
file_path: anomalib/src/anomalib/models/dsr/anomaly_generator.py
imports: from typing import List
  import imgaug.augmenters
  import numpy
  import torch
  from torch import Tensor, nn
  from anomalib.data.utils.generators.perlin import _rand_perlin_2d_np
label_desc: Use image node_id 1 to create a new DsrAnomalyGenerator object from inherited base classes: nn with example: obj = DsrAnomalyGenerator(p_anomalous)