def __bytes__(self) -> bytes:
    if (self.version == 0):
        return self.digest
    return ((varint.encode(self.version) + varint.encode(self.codec.code)) + self.digest)
def __bytes__(self) -> bytes:
    if (self.version == 0):
        return self.digest
    return ((varint.encode(self.version) + varint.encode(self.codec.code)) + self.digest)