def METHOD_NAME(self, value, attr, data):
    """Deserialize DOI value."""
    value = super(DOI, self).METHOD_NAME(value, attr, data)
    value = value.strip()
    if value == '' and not (
            self.required or self.context.get('doi_required')):
        return value
    if not idutils.is_doi(value):
        self.fail('invalid_doi')
    return idutils.normalize_doi(value)