parameters: (fp)
return_statement: return major, minor
docstring: Read the magic string to get the version of the file format.
  
      Parameters
      ----------
      fp : filelike object
  
      Returns
      -------
      major : int
      minor : int
docstring_summary: Read the magic string to get the version of the file format.
docstring_tokens: Read the magic string to get the version of the file format .
function: 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
function_tokens: def read_magic ( fp ) : 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