code: def rectangle(
      input_region: List[int], min_side: int = 10
  ) -> Tuple[List[int], List[int]]:
      """Get coordinates of corners of a rectangle. Only vertical rectangles are
      generated.
  
      Args:
          input_region (List[int]): Region in which to draw the rectangle. [x1, y1, x2, y2]
          min_side (int, optional): Minimum side of the rectangle. Defaults to 10.
      Example:
      >>> image = np.full((200,200,3),fill_value=255, dtype=np.uint8)
      >>> patch_region = random_square_patch([100, 100, 200, 200])
      >>> x1, y1, x2, y2 = rectangle(patch_region)
      >>> patched = image.copy()
      >>> patched[y1:y2, x1:x2, :] = 1
      >>> plt.imshow(patched)
      Returns:
          Tuple[List[int], List[int]]: Random rectangle region. [x1, y1, x2, y2]
      """
      x1_i, y1, x2_i, y2 = input_region
      shortest_dim = min(x2_i - x1_i, y2 - y1)
      # make sure that shortest_dim is larger than min_side
      shortest_dim = max(shortest_dim, min_side + 1)
      cx = (x2_i - x1_i) // 2
      rand_half_width = np.random.randint(min_side, shortest_dim) // 2
      x1 = cx - rand_half_width
      x2 = cx + rand_half_width
  
      xs = np.arange(x1, x2, 1)
      ys = np.arange(y1, y2, 1)
  
      yy, xx = np.meshgrid(ys, xs, sparse=True)
  
      return xx, yy
  
file_path: anomalib/tests/helpers/shapes.py
imports: from typing import List, Tuple
  import numpy
  from skimage.draw import polygon
label_desc: Use image node_id 3 for calling a global function with example usage: rectangle(input_region, min_side) and returns: xx,  yy