@classmethod
def from_bytes(cls, data, nVersion):
    """Instantiate from data and nVersion"""
    if not 0 <= nVersion <= 255:
        raise ValueError(
            'nVersion must be in range 0 to 255 inclusive; got %d' % nVersion)
    self = bytes.__new__(cls, data)
    self.nVersion = nVersion
    return self
