code: def test_table_text_chunks_and_context_split_vertical(
      drop_labels, inc_labels, labeled_table_data_split_table_vertically
  ):
      text, labels, tables = labeled_table_data_split_table_vertically
      etl = TableETL(
          drop_table_from_text_labels=drop_labels, chunk_tables=False
      )
      output = etl.get_table_text_chunks_and_context(
          text=text,
          tables=tables,
          **({"labels": labels} if inc_labels else {}),
      )
      if inc_labels:
          assert output["table_labels"] == [
              [
                  {
                      "text": "A",
                      "start": 0,
                      "end": 1,
                      "label": "in-table",
                  },
                  {
                      "text": "B",
                      "start": 2,
                      "end": 3,
                      "label": "in-table",
                  },
                  {
                      "text": "1",
                      "start": 4,
                      "end": 5,
                      "label": "in-table",
                  },
                  {
                      "text": "2",
                      "start": 6,
                      "end": 7,
                      "label": "in-table",
                  },
                  {
                      "text": "1",
                      "start": 8,
                      "end": 9,
                      "label": "in-table",
                  },
                  {
                      "text": "2",
                      "start": 10,
                      "end": 11,
                      "label": "in-table",
                  },
              ]
          ]
          if drop_labels:
              assert output["doc_labels"] == [[]]
          else:
              assert output["doc_labels"] == [
                  [
                      {
                          "text": "A",
                          "start": 0,
                          "end": 1,
                          "label": "in-table",
                      },
                      {
                          "text": "B",
                          "start": 2,
                          "end": 3,
                          "label": "in-table",
                      },
                      {
                          "text": "1",
                          "start": 4,
                          "end": 5,
                          "label": "in-table",
                      },
                      {
                          "text": "2",
                          "start": 6,
                          "end": 7,
                          "label": "in-table",
                      },
                      {
                          "text": "1",
                          "start": 8,
                          "end": 9,
                          "label": "in-table",
                      },
                      {
                          "text": "2",
                          "start": 10,
                          "end": 11,
                          "label": "in-table",
                      },
                  ]
              ]
      assert output["table_text"][0] == "A B\n1 2\n1 2"
      assert output["doc_text"] == text
      assert output["table_chunks"] == [
          [
              {
                  "document": {"start": 0, "end": 11},
                  "table": {"start": 0, "end": 11},
              }
          ]
      ]
      assert output["table_context"] == [
          [
              {
                  "text": "A",
                  "start": 0,
                  "end": 1,
                  "start_row": 0,
                  "end_row": 0,
                  "start_col": 0,
                  "end_col": 0,
              },
              {
                  "text": "B",
                  "start": 2,
                  "end": 3,
                  "start_row": 0,
                  "end_row": 0,
                  "start_col": 1,
                  "end_col": 1,
              },
              {
                  "text": "1",
                  "start": 4,
                  "end": 5,
                  "start_row": 1,
                  "end_row": 1,
                  "start_col": 0,
                  "end_col": 0,
              },
              {
                  "text": "1",
                  "start": 8,
                  "end": 9,
                  "start_row": 1,
                  "end_row": 1,
                  "start_col": 0,
                  "end_col": 0,
              },
              {
                  "text": "2",
                  "start": 6,
                  "end": 7,
                  "start_row": 1,
                  "end_row": 1,
                  "start_col": 1,
                  "end_col": 1,
              },
              {
                  "text": "2",
                  "start": 10,
                  "end": 11,
                  "start_row": 1,
                  "end_row": 1,
                  "start_col": 1,
                  "end_col": 1,
              },
          ]
      ]
  
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 9 for calling a global function with example usage: test_table_text_chunks_and_context_split_vertical(drop_labels, inc_labels, labeled_table_data_split_table_vertically) without return types