def METHOD_NAME(iob, overlap_threshold):
    chip_ids, box_ids = np.nonzero(iob >= overlap_threshold)
    chip_id2overlap_box_num = np.bincount(chip_ids)  # 1d array
    chip_id2overlap_box_num = np.pad(
        chip_id2overlap_box_num, (0, len(iob) - len(chip_id2overlap_box_num)),
        constant_values=0)
    chosen_chip_ids = []
    while len(box_ids) > 0:
        value_counts = np.bincount(chip_ids)  # 1d array
        max_count_chip_id = np.argmax(value_counts)
        assert max_count_chip_id not in chosen_chip_ids
        chosen_chip_ids.append(max_count_chip_id)
        box_ids_in_cur_chip = box_ids[chip_ids == max_count_chip_id]
        ids_not_in_cur_boxes_mask = np.logical_not(
            np.isin(box_ids, box_ids_in_cur_chip))
        chip_ids = chip_ids[ids_not_in_cur_boxes_mask]
        box_ids = box_ids[ids_not_in_cur_boxes_mask]
    return chosen_chip_ids, chip_id2overlap_box_num