code: def vertice_in_polygon(
      vertice: np.ndarray, polygon_points: np.ndarray
  ) -> bool:
      # The polygon_points are ordered clockwise
  
      # The implementation is based on the algorithm from
      # https://demonstrations.wolfram.com/AnEfficientTestForAPointToBeInAConvexPolygon/
  
      points = (
          polygon_points - vertice
      )  # shift the coordinates origin to the vertice
      edges = np.append(points, points[0:1, :], axis=0)
      return all(
          [
              np.linalg.det([e1, e2]) >= 0
              for e1, e2 in zip(edges, edges[1:])
          ]
      )
  
file_path: layout-parser/src/layoutparser/elements/utils.py
imports: from typing import List, Union, Dict, Dict, Any, Optional, Tuple
  import numpy
  from PIL import Image
label_desc: Use image node_id 4 for calling a global function with example usage: vertice_in_polygon(vertice, polygon_points) and returns: all