code: def test_resolve_preds(drop_table_from_pred, labeled_table_data):
      text, labels, tables = labeled_table_data
      etl = TableETL(
          drop_table_from_text_preds=drop_table_from_pred,
          chunk_tables=False,
      )
      resolved_preds = etl.resolve_preds(
          table_preds=make_labels_predictions(
              [
                  [
                      {
                          "text": "A B",
                          "start": 0,
                          "end": 3,
                          "label": "in-table",
                      }
                  ]
              ]
          ),
          text_preds=make_labels_predictions(
              [
                  [
                      {
                          "text": "text",
                          "start": 5,
                          "end": 9,
                          "label": "non-table",
                      },
                      {
                          "text": "1",
                          "start": 31,
                          "end": 32,
                          "label": "in-table",
                      },
                      {
                          "text": "text",
                          "start": 44,
                          "end": 48,
                          "label": "non-table",
                      },
                  ]
              ]
          ),
          table_chunks=[
              [
                  {
                      "document": {"end": 38, "start": 27},
                      "table": {"end": 11, "start": 0},
                  }
              ]
          ],
          document_text=text,
          table_doc_i=[0],
          tables=tables,
      )
      if drop_table_from_pred:
          assert len(resolved_preds[0]) == 4
          assert resolved_preds == make_labels_predictions(labels)
      else:
          assert len(resolved_preds[0]) == 5
          assert resolved_preds == make_labels_predictions(
              [
                  sorted(
                      labels[0]
                      + [
                          {
                              "text": "1",
                              "start": 31,
                              "end": 32,
                              "label": "in-table",
                          }
                      ],
                      key=lambda x: x["start"],
                  )
              ]
          )
  
file_path: finetune/tests/test_table_labeler.py
imports: import pytest
  from finetune.util.table_labeler import TableLabeler, TableETL
  from finetune.scheduler import Scheduler
label_desc: Use image node_id 7 for calling a global function with example usage: test_resolve_preds(drop_table_from_pred, labeled_table_data) without return types