code: def read_magic(fp):
      """Read the magic string to get the version of the file format.
  
      Parameters
      ----------
      fp : filelike object
  
      Returns
      -------
      major : int
      minor : int
      """
      magic_str = _read_bytes(fp, MAGIC_LEN, "magic string")
      if magic_str[:-2] != MAGIC_PREFIX:
          msg = "the magic string is not correct; expected %r, got %r"
          raise ValueError(msg % (MAGIC_PREFIX, magic_str[:-2]))
      if sys.version_info[0] < 3:
          major, minor = map(ord, magic_str[-2:])
      else:
          major, minor = magic_str[-2:]
      return major, minor
  
imports: from __future__ import division, absolute_import, print_function
  import numpy
  import sys
  import io
  import warnings
  from numpy.lib.utils import safe_eval
  from numpy.compat import asbytes, asstr, isfileobj, long, os_fspath
  from numpy.core.numeric import pickle
label_desc: Use image node_id 3 for calling a global function with example usage: read_magic(fp) and returns: major,  minor