code: def _from_tsv(fname, dtypes=None):
      """Read a tsv file into a dict (which we know is ordered)."""
      data = np.loadtxt(
          fname,
          dtype=str,
          delimiter="\t",
          ndmin=2,
          comments=None,
          encoding="utf-8-sig",
      )
      column_names = data[0, :]
      info = data[1:, :]
      data_dict = dict()
      if dtypes is None:
          dtypes = [str] * info.shape[1]
      if not isinstance(dtypes, (list, tuple)):
          dtypes = [dtypes] * info.shape[1]
      if not len(dtypes) == info.shape[1]:
          raise ValueError(
              f"dtypes length mismatch. Provided: {len(dtypes)}, "
              f"Expected: {info.shape[1]}"
          )
      for i, name in enumerate(column_names):
          data_dict[name] = info[:, i].astype(dtypes[i]).tolist()
      return data_dict
  
imports: import json
  import pathlib
  import numpy
  from ..._fiff._digitization import _make_dig_points
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.utils import _read_segments_file
  from ..._fiff.write import get_new_file_id
  from ...transforms import Transform, apply_trans, get_ras_to_neuromag_trans
  from ...utils import _check_fname, fill_doc, verbose, warn
  from ..base import BaseRaw
  from .sensors import _get_plane_vectors, _get_pos_units, _refine_sensor_orientation, _size2units
label_desc: Use image node_id 6 for calling a global function with example usage: _from_tsv(fname, dtypes) and returns: data_dict