code: def triangle(input_region: List[int]) -> Tuple[List[int], List[int]]:
      """Get coordinates of points inside a triangle.
  
      Args:
          input_region (List[int]): Region in which to draw the triangle. [x1, y1, x2, y2]
      Example:
      >>> image = np.full((200,200,3),fill_value=255, dtype=np.uint8)
      >>> patch_region = random_square_patch([100, 100, 200, 200])
      >>> xx, yy = triangle(patch_region)
      >>> patched = image.copy()
      >>> patched[yy, xx, :] = 1
      >>> plt.imshow(patched)
      Returns:
          Tuple[List[int], List[int]]: Array of cols and rows which denote the mask.
      """
      x1_i, y1_i, x2_i, y2_i = input_region
  
      x1, y1 = x1_i + (x2_i - x1_i) // 2, y1_i
      x2, y2 = x1_i, y2_i
      x3, y3 = x2_i, y2_i
      return polygon([x1, x2, x3], [y1, y2, y3])
  
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 2 for calling a global function with example usage: triangle(input_region) and returns: polygon