code: def forward(self, img):
      # get input image size
      h, w, c = img.shape
  
      # create a rain layer
      rain_layer = self._get_rain_layer()
  
      rain_layer = cv2.resize(rain_layer, (w, h))
      rain_layer = cv2.blur(rain_layer, (3, 3))
      rain_layer = rain_layer * (
          1 - cv2.boxFilter(img, -1, (int(w / 10), int(h / 10)))
      )
  
      # create a haze layer
      haze_layer = self._create_haze_layer(rain_layer)
  
      # combine the rain layer and haze layer together
      rain_layer = (
          self.rain_intensity * rain_layer
          + self.haze_intensity * haze_layer
      )
  
      # synthesize an output image (screen blend)
      img_out = 1 - (1 - rain_layer) * (1 - img)
  
      # gamma and light correction
      img_out = self.light_correction * (img_out**self.gamma)
  
      # check boundary
      img_out = np.clip(img_out, a_min=0, a_max=1.0)
  
      return img_out
  
imports: import cv2
  import numpy
label_desc: Use image node_id 4 for calling the Rain obj's underlying member method code with example usage: obj.forward(img) and returns: img_out