code: def _gravel_process(tens, x1, x2, y1, y2, num_patches):
      tens = to_tensor(tens, enforce_tensor=True)
  
      x = tens.shape[1]
      y = tens.shape[0]
      rectangular_roi_default = []
  
      for i in range(num_patches):
          xx1 = random.randint(x1, x2)
          xx2 = random.randint(x1, xx1)
          yy1 = random.randint(y1, y2)
          yy2 = random.randint(y1, yy1)
          rectangular_roi_default.append(
              (xx2, yy2, min(xx1, xx2 + 200), min(yy1, yy2 + 30))
          )
  
      tens = _hls(tens)
      cspace = tens.cspace
  
      for roi in rectangular_roi_default:
          gravels = _generate_gravel_patch(roi)
          for gravel in gravels:
              x = gravel[0]
              y = gravel[1]
              r = random.randint(1, 4)
              r1 = random.randint(0, 255)
              tens[
                  max(y - r, 0) : min(y + r, y),
                  max(x - r, 0) : min(x + r, x),
                  1,
              ] = r1
  
      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 17 for calling a global function with example usage: _gravel_process(tens, x1, x2, y1, y2, num_patches) and returns: to_tensor