class_docstr: Handles chunking by adding a new set of offsets system keyed by "chunk"
  Performs chunking based on the following rules
  
  * Select longest axis of the table, rows or columns
  * For this longest axis, chunk such that each chunk's effective num tokens is less than the defined max_length
  * effective num tokens is the number of tokens you get if you duplicate tokens by the number of cells they span.
  * Each chunk get's n_rows_context rows of context from the beginning of the opposite axis to the one being chunked (2 rows of context if columns are chunked)
  * If n_rows_context takes up more than max_length / 2 effective tokens then this context is backed off until the amount of context is less than max_length / 2.
  
  
  There is no invese chunking as TableETL.resolve_preds will simply map directly from chunk to document if chunking is enabled.
code: def _create_chunk_mappings(self, original_chunks, new_chunk_points):
      chunk_outputs = []
      original_chunks = sorted(
          original_chunks, key=lambda x: x["table"]["start"]
      )
      new_chunk_offset = 0
      for chunk_span in new_chunk_points:
          for og_chunk in original_chunks:
              if sequences_overlap(og_chunk["table"], chunk_span):
                  relevant_start = max(
                      og_chunk["table"]["start"], chunk_span["start"]
                  )
                  offset_to_table = (
                      relevant_start - og_chunk["table"]["start"]
                  )
                  relevant_end = min(
                      og_chunk["table"]["end"], chunk_span["end"]
                  )
                  relevant_length = relevant_end - relevant_start
                  chunk_outputs.append(
                      {
                          "document": {
                              "start": og_chunk["document"]["start"]
                              + offset_to_table,
                              "end": og_chunk["document"]["start"]
                              + offset_to_table
                              + relevant_length,
                          },
                          "table": {
                              "start": og_chunk["table"]["start"]
                              + offset_to_table,
                              "end": og_chunk["table"]["start"]
                              + offset_to_table
                              + relevant_length,
                          },
                          "chunk": {
                              "start": new_chunk_offset,
                              "end": new_chunk_offset + relevant_length,
                          },
                      }
                  )
                  new_chunk_offset += relevant_length + 1
      return chunk_outputs
  
imports: import copy
  import functools
  import os
  import tempfile
  import typing
  import sys
  from finetune.base_models import TableRoBERTa
  from finetune.util.metrics import sequences_overlap
  from finetune.scheduler import Scheduler
  from finetune.encoding.input_encoder import BaseEncoder
  from finetune import SequenceLabeler
label_desc: Use image node_id 4 for calling the TableChunker obj's underlying member method code with example usage: obj._create_chunk_mappings(original_chunks, new_chunk_points) and returns: chunk_outputs