code: def sim_rain(
      tens: Tensor,
      slant: int = -1,
      drop_length: int = 20,
      drop_width: int = 1,
      drop_color: Tuple = (200, 200, 200),
      rain_type: Optional[str] = "None",
  ) -> Tensor:  ## (200,200,200) is a shade of gray
      r"""
          Simulate rainy conditions on an image.
  
      Args:
          tens (Tensor) : Any regular ``caer.Tensor``.
          slant (int): Slant value.
          drop_length (int): Length of the raindrop.
          drop_width (int): Width of the raindrop.
          drop_color (tuple): Color of the raindrop.
          rain_type (str): Type of rain. Can be either "drizzle", "heavy" or "torrential".
  
      Returns:
          Tensor of shape ``(height, width, channels)``.
  
      Examples::
  
          >> tens = caer.data.sunrise
          >> filtered = caer.filters.sim_rain(tens)
          >> filtered
          (427, 640, 3)
  
      """
  
      slant_extreme = slant
      if not (
          is_numeric(slant_extreme)
          and (slant_extreme >= -20 and slant_extreme <= 20)
          or slant_extreme == -1
      ):
          raise ValueError("Numeric value must be between -20 and 20")
  
      if not (
          is_numeric(drop_width) and drop_width >= 1 and drop_width <= 5
      ):
          raise ValueError("Width must be between 1 and 5")
  
      if not (
          is_numeric(drop_length)
          and drop_length >= 0
          and drop_length <= 100
      ):
          raise ValueError("Length must be between 0 and 100")
  
      imshape = tens.shape
      if slant_extreme == -1:
          slant = np.random.randint(
              -10, 10
          )  # generate random slant if no slant value is given
  
      rain_drops, drop_length = _generate_random_lines(
          imshape, slant, drop_length, rain_type
      )
      return _rain_process(
          tens,
          slant_extreme,
          drop_length,
          drop_color,
          drop_width,
          rain_drops,
      )
  
file_path: caer/caer/transforms/simulate.py
imports: import numpy
  import cv2
  import random
  import math
  from ..coreten import Tensor, is_tensor
  from ..annotations import Tuple, Optional, Union
  from .functional import is_numeric, is_numeric_list_or_tuple, is_tuple, _rgb, _snow_process, _generate_random_lines, _rain_process, _generate_random_blur_coordinates, _add_blur, _gravel_process, _add_sun_flare_line, _add_sun_process, _apply_motion_blur, _autumn_process, _shadow_process
label_desc: Use image node_id 2 for calling a global function with example usage: sim_rain(tens, slant, drop_length, drop_width, drop_color, rain_type) and returns: _rain_process