code: def write_fine_calibration(fname, calibration):
      """Write fine calibration information to a ``.dat`` file.
  
      Parameters
      ----------
      fname : path-like
          The filename to write out.
      calibration : dict
          Fine calibration information.
      """
      fname = _check_fname(fname, overwrite=True)
      check_fname(fname, "cal", (".dat",))
      keys = ("ch_names", "locs", "imb_cals")
      with open(fname, "wb") as cal_file:
          for ch_name, loc, imb_cal in zip(
              *(calibration[key] for key in keys)
          ):
              cal_line = np.concatenate([loc, imb_cal]).round(6)
              cal_line = " ".join(f"{c:0.6f}" for c in cal_line)
              cal_file.write(f"{ch_name} {cal_line}\n".encode("ASCII"))
  
imports: from collections import defaultdict
  from functools import partial
  import numpy
  from scipy.optimize import fmin_cobyla
  from .._fiff.pick import pick_info, pick_types
  from .._fiff.tag import _coil_trans_to_loc, _loc_to_coil_trans
  from ..bem import _check_origin
  from ..io import BaseRaw
  from ..transforms import _find_vector_rotation
  from ..utils import _check_fname, _check_option, _ensure_int, _pl, _reg_pinv, _validate_type, check_fname, logger, verbose
  from .maxwell import _col_norm_pinv, _get_grad_point_coilsets, _prep_fine_cal, _prep_mf_coils, _read_cross_talk, _trans_sss_basis
label_desc: Use image node_id 11 for calling a global function with example usage: write_fine_calibration(fname, calibration) without return types