code: def _compose_meas_info(meg, chans):
      """Create info structure."""
      info = _empty_info(meg["SamplingFrequency"])
  
      # Collect all the necessary data from the structures read
      info["meas_id"] = get_new_file_id()
      tmp = _convert_channel_info(chans)
      info["chs"] = _refine_sensor_orientation(tmp)
      # info['chs'] = _convert_channel_info(chans)
      info["line_freq"] = meg["PowerLineFrequency"]
      info["bads"] = _read_bad_channels(chans)
      info._unlocked = False
      info._update_redundant()
      return info
  
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 3 for calling a global function with example usage: _compose_meas_info(meg, chans) and returns: info