Write an 8-byte data block at address (block * 8). The target
        bytes are zero'd first if *erase* is True.

def write_block(self, block, data, erase=True):
        """Write an 8-byte data block at address (block * 8). The target
        bytes are zero'd first if *erase* is True.

        """
        if block < 0 or block > 255:
            raise ValueError("invalid block number")
        log.debug("write block {0}".format(block))
        cmd = "\x54" if erase is True else "\x1B"
        cmd = cmd + chr(block) + data + self.uid
        rsp = self.transceive(cmd)
        if len(rsp) < 9:
            raise Type1TagCommandError(RESPONSE_ERROR)
        if erase is True and rsp[1:9] != data:
            raise Type1TagCommandError(WRITE_ERROR)