code: def _get_matfile_version(fileobj):
      # Mat4 files have a zero somewhere in first 4 bytes
      fileobj.seek(0)
      mopt_bytes = fileobj.read(4)
      if len(mopt_bytes) == 0:
          raise MatReadError("Mat file appears to be empty")
      mopt_ints = np.ndarray(
          shape=(4,), dtype=np.uint8, buffer=mopt_bytes
      )
      if 0 in mopt_ints:
          fileobj.seek(0)
          return (0, 0)
      # For 5 format or 7.3 format we need to read an integer in the
      # header. Bytes 124 through 128 contain a version integer and an
      # endian test string
      fileobj.seek(124)
      tst_str = fileobj.read(4)
      fileobj.seek(0)
      maj_ind = int(tst_str[2] == b"I"[0])
      maj_val = int(tst_str[maj_ind])
      min_val = int(tst_str[1 - maj_ind])
      ret = (maj_val, min_val)
      if maj_val in (1, 2):
          return ret
      raise ValueError(
          "Unknown mat file type, version {}, {}".format(*ret)
      )
  
imports: import numpy
  from scipy._lib import doccer
  from .None import _byteordercodes
label_desc: Use image node_id 4 for calling a global function with example usage: _get_matfile_version(fileobj) and returns: int,  int, ret