code: def polygon_area(xs: np.ndarray, ys: np.ndarray) -> float:
      """Calculate the area of polygons using
      `Shoelace Formula <https://en.wikipedia.org/wiki/Shoelace_formula>`_.
  
      Args:
          xs (`np.ndarray`): The x coordinates of the points
          ys (`np.ndarray`): The y coordinates of the points
      """
  
      # Refer to: https://stackoverflow.com/questions/24467972/calculate-area-of-polygon-given-x-y-coordinates
      # The formula is equivalent to the original one indicated in the wikipedia
      # page.
  
      return 0.5 * np.abs(
          np.dot(xs, np.roll(ys, 1)) - np.dot(ys, np.roll(xs, 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 5 for calling a global function with example usage: polygon_area(xs, ys) and returns: unknown