code: def test_resolve_preds_pred_spans_table(
      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": "B",
                          "start": 2,
                          "end": 3,
                          "label": "in-table",
                      }
                  ]
              ]
          ),
          text_preds=make_labels_predictions(
              [
                  [
                      {
                          "text": "Some text before the table\nA",
                          "start": 0,
                          "end": 28,
                          "label": "mixed",
                      }
                  ]
              ]
          ),
          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 resolved_preds == make_labels_predictions(
              [
                  [
                      {
                          "text": "Some text before the table\n",
                          "start": 0,
                          "end": 27,
                          "label": "mixed",
                      },
                      {
                          "text": "B",
                          "start": 29,
                          "end": 30,
                          "label": "in-table",
                      },
                  ]
              ]
          )
      else:
          assert resolved_preds == make_labels_predictions(
              [
                  [
                      {
                          "text": "Some text before the table\n",
                          "start": 0,
                          "end": 27,
                          "label": "mixed",
                      },
                      {
                          "text": "A",
                          "start": 27,
                          "end": 28,
                          "label": "mixed",
                      },
                      {
                          "text": "B",
                          "start": 29,
                          "end": 30,
                          "label": "in-table",
                      },
                  ]
              ]
          )
  
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 10 for calling a global function with example usage: test_resolve_preds_pred_spans_table(drop_table_from_pred, labeled_table_data) without return types