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]))
      major, minor = magic_str[-2:]
      return major, minor
  
imports: import io
  import os
  import pickle
  import warnings
  import numpy
  from numpy.lib._utils_impl import drop_metadata
label_desc: Use image node_id 3 for calling a global function with example usage: read_magic(fp) and returns: major,  minor