def METHOD_NAME(stream):
    if type(stream) is not ZStream:
        stream.seek(0)
    for v in contents:
        if type(v) is str:
            assert v == stream.read_string()
        elif type(v) is int:
            assert v == stream.read_int64()
        elif type(v) is float:
            assert dr.abs(stream.read_single() - v) / v < 1e-5
        elif type(v) is bool:
            assert v == stream.read_bool()