code: def _read_header(fname):
      nsx_file_id = np.fromfile(
          fname, count=1, dtype=[("file_id", "S8")]
      )[0]["file_id"].decode()
  
      if nsx_file_id in ["NEURALCD", "BRSMPGRP"]:
          basic_header = _read_header_22_and_above(fname)
      elif nsx_file_id == "NEURALSG":
          raise NotImplementedError(
              "NSx file id (= NEURALSG), i.e., file"
              " version 2.1 is currently not supported."
          )
      else:
          raise ValueError(
              f"NSx file id (={nsx_file_id}) does not match"
              " with supported file ids:"
              " ('NEURALCD', 'BRSMPGRP')"
          )
  
      time_origin = datetime(
          *[
              basic_header.pop(xx)
              for xx in (
                  "year",
                  "month",
                  "day",
                  "hour",
                  "minute",
                  "second",
                  "millisecond",
              )
          ],
          tzinfo=timezone.utc,
      )
      basic_header["meas_date"] = time_origin
      return basic_header
  
file_path: mne-python/mne/io/nsx/nsx.py
imports: import os
  from datetime import datetime, timezone
  import numpy
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.utils import _file_size, _read_segments_file
  from ...annotations import Annotations
  from ...utils import fill_doc, logger, warn
  from ..base import BaseRaw, _get_scaling
label_desc: Use image node_id 2 for calling a global function with example usage: _read_header(fname) and returns: basic_header