code: def check_points_in_polys(points, polys):
      """Check whether point is in rotated boxes
      Args:
          points (tensor): (1, L, 2) anchor points
          polys (tensor): [B, N, 4, 2] gt_polys
          eps (float): default 1e-9
      Returns:
          is_in_polys (tensor): (B, N, L)
      """
      # [1, L, 2] -> [1, 1, L, 2]
      points = points.unsqueeze(0)
      # [B, N, 4, 2] -> [B, N, 1, 2]
      a, b, c, d = polys.split(4, axis=2)
      ab = b - a
      ad = d - a
      # [B, N, L, 2]
      ap = points - a
      # [B, N, 1]
      norm_ab = paddle.sum(ab * ab, axis=-1)
      # [B, N, 1]
      norm_ad = paddle.sum(ad * ad, axis=-1)
      # [B, N, L] dot product
      ap_dot_ab = paddle.sum(ap * ab, axis=-1)
      # [B, N, L] dot product
      ap_dot_ad = paddle.sum(ap * ad, axis=-1)
      # [B, N, L] <A, B> = |A|*|B|*cos(theta)
      is_in_polys = (
          (ap_dot_ab >= 0)
          & (ap_dot_ab <= norm_ab)
          & (ap_dot_ad >= 0)
          & (ap_dot_ad <= norm_ad)
      )
      return is_in_polys
  
file_path: PaddleDetection/ppdet/modeling/rbox_utils.py
imports: import math
  import paddle
  import numpy
  import cv2
label_desc: Use image node_id 10 for calling a global function with example usage: check_points_in_polys(points, polys) and returns: is_in_polys