def METHOD_NAME(buff1):
    buff = buff1.read(1)
    version = unpack_from(_UCHAR, buff[:1])[0]
    if version is not _V0:
        ex = TProtocolException(
            TProtocolException.BAD_VERSION,
            "Wrong Frugal version. Found {0}, wanted {1}.".format(
                version, _V0)
        )
        logger.exception(ex)
        raise ex
    buff = buff1.read(4)
    size = unpack_from(_UINT, buff[0:4])[0]
    buff = buff1.read(size)
    return _Headers._read_pairs(buff, 0, size)