code: def center_rule_match(
      end2end_xywh_bboxes, structure_master_xyxy_bboxes
  ):
      """
      Judge end2end Bbox's center point is inside structure master Bbox or not,
      if end2end Bbox's center is in structure master Bbox, get matching pair.
      :param end2end_xywh_bboxes:
      :param structure_master_xyxy_bboxes:
      :return: match pairs list, e.g. [[0,1], [1,2], ...]
      """
      match_pairs_list = []
      for i, end2end_xywh in enumerate(end2end_xywh_bboxes):
          for j, master_xyxy in enumerate(structure_master_xyxy_bboxes):
              x_end2end, y_end2end = end2end_xywh[0], end2end_xywh[1]
              x_master1, y_master1, x_master2, y_master2 = (
                  master_xyxy[0],
                  master_xyxy[1],
                  master_xyxy[2],
                  master_xyxy[3],
              )
              center_point_end2end = (x_end2end, y_end2end)
              corner_point_master = (
                  (x_master1, y_master1),
                  (x_master2, y_master2),
              )
              if is_inside(center_point_end2end, corner_point_master):
                  match_pairs_list.append([i, j])
      return match_pairs_list
  
imports: import os
  import re
  import cv2
  import glob
  import copy
  import math
  import pickle
  import numpy
  from shapely.geometry import Polygon, MultiPoint
label_desc: Use image node_id 15 for calling a global function with example usage: center_rule_match(end2end_xywh_bboxes, structure_master_xyxy_bboxes) and returns: match_pairs_list