def METHOD_NAME(sp_f):
    with open(sp_f, 'rb') as f:
        try:
            elffile = ELFFile(f)
        except ELFError:
            # Binary format SP, return zero flags
            return 0
        for s in elffile.iter_sections():
            if get_name(s) == '.sp_head':
                return struct.unpack('<16x4xI', s.data()[:24])[0]
        raise Exception('.sp_head section not found')