code: def get_labels(self, gt_tables):
          
          labels = np.zeros(len(self.candidates))
          for i, candidate in enumerate(self.candidates):
              page_num = candidate[0]
              try:
                  tables = gt_tables[page_num]
                  for gt_table in tables:
                      page_width, page_height, y0, x0, y1, x1 = gt_table
                      w_ratio = float(candidate[1]) / page_width
                      h_ratio = float(candidate[2]) / page_height
                      rescaled_gt_table = (
                          y0 * h_ratio,
                          x0 * w_ratio,
                          y1 * h_ratio,
                          x1 * w_ratio,
                      )
                      iou = compute_iou(candidate[-4:], rescaled_gt_table)
                      if iou > self.iou_thresh:
                          # candidate region is a table
                          labels[i] = 1
              except KeyError:
                  # any of the candidates is a true table, all zero labels
                  pass
          return labels
docs: :param gt_tables: dict, keys are page number and values are list of
                            tables bbox within that page
          :return: