code: def add_shadow(img, vertices_list):
      
      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 RandomSnow 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
docs: Add shadows to the image.
  
      From https://github.com/UjjwalSaxena/Automold--Road-Augmentation-Library
  
      Args:
          img (np.array):
          vertices_list (list):
  
      Returns: