code: def _generate_mne_locs_file(output_fname):
      """Generate mne coil locs and save to supplied file."""
      logger.info("Converting Tristan coil file to mne loc file...")
      resource_dir = op.join(
          op.dirname(op.abspath(__file__)), "resources"
      )
      chan_fname = op.join(resource_dir, "Artemis123_ChannelMap.csv")
      chans = _load_tristan_coil_locs(chan_fname)
  
      # compute a dict of loc structs
      locs = {n: _compute_mne_loc(cinfo) for n, cinfo in chans.items()}
  
      # write it out to output_fname
      with open(output_fname, "w") as fid:
          for n in sorted(locs.keys()):
              fid.write("%s," % n)
              fid.write(",".join(locs[n].astype(str)))
              fid.write("\n")
  
file_path: mne-python/mne/io/artemis123/utils.py
imports: import os.path
  import numpy
  from ..._fiff._digitization import _artemis123_read_pos
  from ...transforms import rotation3d_align_z_axis
  from ...utils import logger
label_desc: Use image node_id 2 for calling a global function with example usage: _generate_mne_locs_file(output_fname) without return types