code: def test_no_loc_none(monkeypatch):
      """Test that we don't set loc to None when no trans is found."""
      ch_name = "MLzA"
  
      def _read_config_bad(*args, **kwargs):
          cfg = _read_config(*args, **kwargs)
          idx = [ch["name"] for ch in cfg["chs"]].index(ch_name)
          del cfg["chs"][idx]["dev"]["transform"]
          return cfg
  
      monkeypatch.setattr(
          mne.io.bti.bti, "_read_config", _read_config_bad
      )
      kwargs = dict(
          pdf_fname=pdf_fnames[0],
          config_fname=config_fnames[0],
          head_shape_fname=hs_fnames[0],
          rename_channels=False,
          sort_by_ch_name=False,
      )
      raw = read_raw_bti(**kwargs)
      idx = raw.ch_names.index(ch_name)
      assert_allclose(raw.info["chs"][idx]["loc"], np.full(12, np.nan))
  
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 2 for calling a global function with example usage: test_no_loc_none(monkeypatch) and returns: cfg