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

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

    if ('DATASUM' in self._header):
        datasum = self._calculate_datasum(blocking)
        if (datasum == int(self._header['DATASUM'])):
            return 1
        elif (blocking == 'either'):
            return self.verify_datasum(blocking='nonstandard')
        else:
            return 0
    else:
        return 2
