code: def add_rain(
      img,
      slant,
      drop_length,
      drop_width,
      drop_color,
      blur_value,
      brightness_coefficient,
      rain_drops,
  ):
      """
  
      From https://github.com/UjjwalSaxena/Automold--Road-Augmentation-Library
  
      Args:
          img (numpy.ndarray): Image.
          slant (int):
          drop_length:
          drop_width:
          drop_color:
          blur_value (int): Rainy view are blurry.
          brightness_coefficient (float): Rainy days are usually shady.
          rain_drops:
  
      Returns:
          numpy.ndarray: Image.
  
      """
      non_rgb_warning(img)
  
      input_dtype = img.dtype
      needs_float = False
  
      if input_dtype == np.float32:
          img = from_float(img, dtype=np.dtype("uint8"))
          needs_float = True
      elif input_dtype not in (np.uint8, np.float32):
          raise ValueError(
              "Unexpected dtype {} for RandomRain augmentation".format(
                  input_dtype
              )
          )
  
      image = img.copy()
  
      for rain_drop_x0, rain_drop_y0 in rain_drops:
          rain_drop_x1 = rain_drop_x0 + slant
          rain_drop_y1 = rain_drop_y0 + drop_length
  
          cv2.line(
              image,
              (rain_drop_x0, rain_drop_y0),
              (rain_drop_x1, rain_drop_y1),
              drop_color,
              drop_width,
          )
  
      image = cv2.blur(
          image, (blur_value, blur_value)
      )  # rainy view are blurry
      image_hsv = cv2.cvtColor(image, cv2.COLOR_RGB2HSV).astype(
          np.float32
      )
      image_hsv[:, :, 2] *= brightness_coefficient
  
      image_rgb = cv2.cvtColor(
          image_hsv.astype(np.uint8), cv2.COLOR_HSV2RGB
      )
  
      if needs_float:
          image_rgb = to_float(image_rgb, max_value=255)
  
      return image_rgb
  
imports: from __future__ import division
  from typing import Optional, Sequence, Union
  from warnings import warn
  import cv2
  import numpy
  import skimage
  from albumentations import random_utils
  from albumentations.augmentations.utils import MAX_VALUES_BY_DTYPE, _maybe_process_in_chunks, clip, clipped, ensure_contiguous, is_grayscale_image, is_rgb_image, non_rgb_warning, preserve_channel_dim, preserve_shape
label_desc: Use image node_id 22 for calling a global function with example usage: add_rain(img, slant, drop_length, drop_width, drop_color, blur_value, brightness_coefficient, rain_drops) and returns: image_rgb