code: def test_nan_trans(pdf, config, hs, exported):
      """Test unlikely case that the device to head transform is empty."""
      bti_info = _read_bti_header(pdf, config, sort_by_ch_name=True)
  
      dev_ctf_t = Transform(
          "ctf_meg",
          "ctf_head",
          _correct_trans(bti_info["bti_transform"][0]),
      )
  
      # reading params
      convert = True
      rotation_x = 0.0
      translation = (0.0, 0.02, 0.11)
      bti_dev_t = _get_bti_dev_t(rotation_x, translation)
      bti_dev_t = Transform("ctf_meg", "meg", bti_dev_t)
      ecg_ch = "E31"
      eog_ch = ("E63", "E64")
  
      # read parts of info to get trans
      bti_ch_names = list()
      for ch in bti_info["chs"]:
          ch_name = ch["name"]
          if not ch_name.startswith("A"):
              ch_name = ch.get("chan_label", ch_name)
          bti_ch_names.append(ch_name)
  
      neuromag_ch_names = _rename_channels(
          bti_ch_names, ecg_ch=ecg_ch, eog_ch=eog_ch
      )
      ch_mapping = zip(bti_ch_names, neuromag_ch_names)
  
      # add some nan in some locations!
      dev_ctf_t["trans"][:, 3] = np.nan
      _check_nan_dev_head_t(dev_ctf_t)
      for idx, (chan_4d, chan_neuromag) in enumerate(ch_mapping):
          loc = bti_info["chs"][idx]["loc"]
          if loc is not None:
              if convert:
                  t = _loc_to_coil_trans(bti_info["chs"][idx]["loc"])
                  t = _convert_coil_trans(t, dev_ctf_t, bti_dev_t)
  
imports: import os
  from collections import Counter
  from functools import partial, reduce
  from io import BytesIO
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  import mne
  from mne import pick_info, pick_types
  from mne._fiff._digitization import _make_bti_dig_points
  from mne._fiff.constants import FIFF
  from mne.datasets import testing
  from mne.io import read_raw_bti, read_raw_fif
  from mne.io.bti.bti import _check_nan_dev_head_t, _convert_coil_trans, _correct_trans, _get_bti_dev_t, _get_bti_info, _loc_to_coil_trans, _read_bti_header, _read_config, _read_head_shape, _rename_channels
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.transforms import Transform, combine_transforms, invert_transform
  from mne.utils import assert_dig_allclose
label_desc: Use image node_id 11 for calling a global function with example usage: test_nan_trans(pdf, config, hs, exported) without return types