'Verify that the value in the ``CHECKSUM`` keyword matches the
value calculated for the current HDU CHECKSUM.
blocking : str, optional
"standard" or "nonstandard", compute sum 2880 bytes at a time, or
not
Returns
valid : int
- 0 - failure
- 1 - success
- 2 - no ``CHECKSUM`` keyword present'

def verify_checksum(self, blocking='standard'):

    if ('CHECKSUM' in self._header):
        if ('DATASUM' in self._header):
            datasum = self._calculate_datasum(blocking)
        else:
            datasum = 0
        checksum = self._calculate_checksum(datasum, blocking)
        if (checksum == self._header['CHECKSUM']):
            return 1
        elif (blocking == 'either'):
            return self.verify_checksum(blocking='nonstandard')
        else:
            return 0
    else:
        return 2
