code: def _read_header(input_fname):
      """Obtain the headers from the file package mff.
  
      Parameters
      ----------
      input_fname : path-like
          Path for the file
  
      Returns
      -------
      info : dict
          Main headers set.
      """
      input_fname = str(input_fname)  # cast to str any Paths
      mff_hdr = _read_mff_header(input_fname)
      with open(input_fname + "/signal1.bin", "rb") as fid:
          version = np.fromfile(fid, np.int32, 1)[0]
      """
      the datetime.strptime .f directive (milleseconds)
      will only accept up to 6 digits. if there are more than
      six millesecond digits in the provided timestamp string
      (i.e. because of trailing zeros, as in test_egi_pns.mff)
      then slice both the first 26 elements and the last 6
      elements of the timestamp string to truncate the
      milleseconds to 6 digits and extract the timezone,
      and then piece these together and assign back to mff_hdr['date']
      """
      if len(mff_hdr["date"]) > 32:
          dt, tz = [mff_hdr["date"][:26], mff_hdr["date"][-6:]]
          mff_hdr["date"] = dt + tz
  
      time_n = datetime.datetime.strptime(
          mff_hdr["date"], "%Y-%m-%dT%H:%M:%S.%f%z"
      )
  
      info = dict(
          version=version,
          meas_dt_local=time_n,
          utc_offset=time_n.strftime("%z"),
          gain=0,
          bits=0,
          value_range=0,
      )
      info.update(
          n_categories=0,
          n_segments=1,
          n_events=0,
          event_codes=[],
          category_names=[],
          category_lengths=[],
          pre_baseline=0,
      )
      info.update(mff_hdr)
      return info
  
imports: import datetime
  import math
  import os.path
  import re
  from collections import OrderedDict
  from pathlib import Path
  import numpy
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info, _ensure_meas_date_none_or_dt, create_info
  from ..._fiff.proj import setup_proj
  from ..._fiff.utils import _create_chs, _mult_cal_one
  from ...annotations import Annotations
  from ...channels.montage import make_dig_montage
  from ...evoked import EvokedArray
  from ...utils import _check_fname, _check_option, _soft_import, logger, verbose, warn
  from ..base import BaseRaw
  from .events import _combine_triggers, _read_events
  from .general import _block_r, _extract, _get_blocks, _get_ep_info, _get_gains, _get_signalfname
label_desc: Use image node_id 2 for calling a global function with example usage: _read_header(input_fname) and returns: info