code: def _shadow_process(
      tens, num_shadows, x1, y1, x2, y2, shadow_dimension
  ) -> Tensor:
      tens = to_tensor(tens, enforce_tensor=True)
      tens = _hls(tens)  ## Conversion to hls
      cspace = tens.cspace
  
      mask = np.zeros_like(tens)
      imshape = tens.shape
  
      # Get the list of shadow vertices
      vertices_list = _generate_shadow_coordinates(
          num_shadows, (x1, y1, x2, y2), shadow_dimension
      )
  
      for vertices in vertices_list:
          cv.fillPoly(
              mask, vertices, 255
          )  ## adding all shadow polygons on empty mask, single 255 denotes only red channel
  
      # If red channel is hot, the Tensor's "Lightness" channel's brightness value is lowered
      tens[:, :, 1][mask[:, :, 0] == 255] = (
          tens[:, :, 1][mask[:, :, 0] == 255] * 0.5
      )
  
      return to_tensor(tens, cspace=cspace)
  
imports: import cv2
  import random
  import math
  import numpy
  from ..coreten import Tensor, to_tensor
  from ..annotations import Tuple, Union
  from ..color import to_hls, to_rgb, to_bgr, to_hsv, to_gray, to_lab
label_desc: Use image node_id 26 for calling a global function with example usage: _shadow_process(tens, num_shadows, x1, y1, x2, y2, shadow_dimension) and returns: to_tensor