code: def add_shadow(img, vertices_list):
      """Add shadows to the image.
  
      From https://github.com/UjjwalSaxena/Automold--Road-Augmentation-Library
  
      Args:
          img (numpy.ndarray):
          vertices_list (list):
  
      Returns:
          numpy.ndarray:
  
      """
      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 RandomShadow augmentation".format(
                  input_dtype
              )
          )
  
      image_hls = cv2.cvtColor(img, cv2.COLOR_RGB2HLS)
      mask = np.zeros_like(img)
  
      # adding all shadow polygons on empty mask, single 255 denotes only red channel
      for vertices in vertices_list:
          cv2.fillPoly(mask, vertices, 255)
  
      # if red channel is hot, image's "Lightness" channel's brightness is lowered
      red_max_value_ind = mask[:, :, 0] == 255
      image_hls[:, :, 1][red_max_value_ind] = (
          image_hls[:, :, 1][red_max_value_ind] * 0.5
      )
  
      image_rgb = cv2.cvtColor(image_hls, cv2.COLOR_HLS2RGB)
  
      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 25 for calling a global function with example usage: add_shadow(img, vertices_list) and returns: image_rgb