code: def write_int(fid, kind, data):
      """Write a 32-bit integer tag to a fif file."""
      data_size = 4
      data = np.asarray(data)
      if data.dtype.kind not in "uib" and data.size > 0:
          raise TypeError(
              f"Cannot safely write data with dtype {data.dtype} as int"
          )
      max_val = data.max() if data.size > 0 else 0
      if max_val > INT32_MAX:
          raise TypeError(
              f"Value {max_val} exceeds maximum allowed ({INT32_MAX}) for "
              f"tag {kind}"
          )
      data = data.astype(">i4").T
      _write(fid, data, kind, data_size, FIFF.FIFFT_INT, ">i4")
  
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 4 for calling a global function with example usage: write_int(fid, kind, data) without return types