code: def _get_nicolet_info(fname, ch_type, eog, ecg, emg, misc):
      """Extract info from Nicolet header files."""
      fname, extension = path.splitext(fname)
  
      if extension != ".data":
          raise ValueError(
              f'File name should end with .data not "{extension}".'
          )
  
      header = fname + ".head"
  
      logger.info("Reading header...")
      header_info = dict()
      with open(header) as fid:
          for line in fid:
              var, value = line.split("=")
              if var == "elec_names":
                  value = value[1:-2].split(",")  # strip brackets
              elif var == "conversion_factor":
                  value = float(value)
              elif var in [
                  "num_channels",
                  "rec_id",
                  "adm_id",
                  "pat_id",
                  "num_samples",
              ]:
                  value = int(value)
              elif var != "start_ts":
                  value = float(value)
              header_info[var] = value
  
      ch_names = header_info["elec_names"]
      if eog == "auto":
          eog = _find_channels(ch_names, "EOG")
      if ecg == "auto":
          ecg = _find_channels(ch_names, "ECG")
      if emg == "auto":
          emg = _find_channels(ch_names, "EMG")
  
      date, time = header_info["start_ts"].split()
      date = date.split("-")
      time = time.split(":")
      sec, msec = time[2].split(".")
      date = datetime.datetime(
          int(date[0]),
          int(date[1]),
          int(date[2]),
          int(time[0]),
          int(time[1]),
          int(sec),
          int(msec),
      )
      info = _empty_info(header_info["sample_freq"])
      info["meas_date"] = (calendar.timegm(date.utctimetuple()), 0)
  
      if ch_type == "eeg":
          ch_coil = FIFF.FIFFV_COIL_EEG
          ch_kind = FIFF.FIFFV_EEG_CH
      elif ch_type == "seeg":
          ch_coil = FIFF.FIFFV_COIL_EEG
          ch_kind = FIFF.FIFFV_SEEG_CH
      else:
          raise TypeError(
              "Channel type not recognized. Available types are "
              "'eeg' and 'seeg'."
          )
      cals = np.repeat(
          header_info["conversion_factor"] * 1e-6, len(ch_names)
      )
      info["chs"] = _create_chs(
          ch_names, cals, ch_coil, ch_kind, eog, ecg, emg, misc
      )
      info["highpass"] = 0.0
      info["lowpass"] = info["sfreq"] / 2.0
      info._unlocked = False
      info._update_redundant()
      return info, header_info
  
file_path: mne-python/mne/io/nicolet/nicolet.py
imports: import calendar
  import datetime
  from os import path
  import numpy
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.utils import _create_chs, _find_channels, _read_segments_file
  from ...utils import fill_doc, logger
  from ..base import BaseRaw
label_desc: Use image node_id 2 for calling a global function with example usage: _get_nicolet_info(fname, ch_type, eog, ecg, emg, misc) and returns: info,  header_info