code: def file_to_dict(tsv, cell_delimiter, str_col_idx):
      result = {}
      rows = [
          row.split(cell_delimiter) for row in tsv.strip().split("\n")
      ]
      if len(rows) < 2:
          return result
  
      header = rows.pop(0)
      length = len(header)
      if len(rows[-1]) < length:
          # Fixes bug that occurs when last text string in TSV is null, and
          # last row is missing a final cell in TSV file
          rows[-1].append("")
  
      if str_col_idx < 0:
          str_col_idx += length
  
      for i, head in enumerate(header):
          result[head] = list()
          for row in rows:
              if len(row) <= i:
                  continue
  
              if i != str_col_idx:
                  try:
                      val = int(float(row[i]))
                  except ValueError:
                      val = row[i]
              else:
                  val = row[i]
  
              result[head].append(val)
  
      return result
  
imports: import logging
  import re
  import shlex
  import string
  import subprocess
  import sys
  from contextlib import contextmanager
  from csv import QUOTE_NONE
  from errno import ENOENT
  from functools import wraps
  from glob import iglob
  from io import BytesIO
  from os import environ
  from os import extsep
  from os import linesep
  from os import remove
  from os.path import normcase
  from os.path import normpath
  from os.path import realpath
  from tempfile import NamedTemporaryFile
  from time import sleep
  from typing import List
  from typing import Optional
  from packaging.version import InvalidVersion
  from packaging.version import parse
  from packaging.version import Version
  from PIL import Image
label_desc: Use image node_id 13 for calling a global function with example usage: file_to_dict(tsv, cell_delimiter, str_col_idx) and returns: result, result