code: def write_id(fid, kind, id_=None):
      """Write fiff id."""
      id_ = _generate_meas_id() if id_ is None else id_
  
      data_size = 5 * 4  # The id comprises five integers
      fid.write(np.array(kind, dtype=">i4").tobytes())
      fid.write(np.array(FIFF.FIFFT_ID_STRUCT, dtype=">i4").tobytes())
      fid.write(np.array(data_size, dtype=">i4").tobytes())
      fid.write(np.array(FIFF.FIFFV_NEXT_SEQ, dtype=">i4").tobytes())
  
      # Collect the bits together for one write
      arr = np.array(
          [
              id_["version"],
              id_["machid"][0],
              id_["machid"][1],
              id_["secs"],
              id_["usecs"],
          ],
          dtype=">i4",
      )
      fid.write(arr.tobytes())
  
imports: import os.path
  import re
  import time
  import uuid
  from contextlib import contextmanager
  from gzip import GzipFile
  import numpy
  from scipy.sparse import csc_matrix, csr_matrix
  from ..utils import _file_like, _validate_type, logger
  from ..utils.numerics import _cal_to_julian
  from .constants import FIFF
label_desc: Use image node_id 23 for calling a global function with example usage: write_id(fid, kind, id_) without return types