code: def resolve_preds(
      self,
      table_preds: t.List[DocumentSpans],
      text_preds: t.List[DocumentSpans],
      table_chunks: t.List[TableChunks],
      document_text: t.List[str],
      table_doc_i: t.List[int],
      tables: t.List[DocumentTables],
  ) -> t.List[DocumentSpans]:
      output_preds = []
  
      # First sort the table preds and chunks back into a list that aligns with documents
      table_pred_chunks = [[] for _ in document_text]
      for p, c, i in zip(table_preds, table_chunks, table_doc_i):
          table_pred_chunks[i].append((p, c))
  
      for i, (
          text_preds_i,
          document_text_i,
          doc_pred_chunks,
      ) in enumerate(zip(text_preds, document_text, table_pred_chunks)):
          output_doc_preds = []
          for table_preds, table_chunks in doc_pred_chunks:
              output_doc_preds += fix_spans(
                  table_preds,
                  table_chunks=table_chunks,
                  output_space_text=document_text_i,
                  input_space="chunk" if self.chunk_tables else "table",
                  output_space="document",
              )
          if self.drop_table_from_text_preds:
              output_doc_preds += self.remove_table_labels(
                  text_preds_i,
                  [d[1] for d in doc_pred_chunks],
                  doc_text=document_text_i,
              )
          else:
              output_doc_preds += text_preds_i
          output_preds.append(
              self.cleanup_predictions(
                  output_doc_preds,
                  tables=tables[i],
                  doc_text=document_text[i],
              )
          )
      return output_preds
  
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 10 for calling the TableETL obj's underlying member method code with example usage: obj.resolve_preds(table_preds, text_preds, table_chunks, document_text, table_doc_i, tables) and returns: output_preds