docs: public static int estimateXidSize(Xid xid) {
        if (xid instanceof RemoteXid) {
           return ((RemoteXid) xid).estimateSize();
        } else {
           // Worst case.
           // To be more accurate, we need to invoke getGlobalTransactionId and getBranchQualifier that will most likely
           //create and copy the array
           return estimateVIntSize(xid.getFormatId()) + Xid.MAXBQUALSIZE + Xid.MAXGTRIDSIZE;
        }
     }