'Check this object for internal consistency.
:raise ObjectFormatException: if the object is malformed in some way'

def check(self):

    super(Tag, self).check()
    self._check_has_member('_object_sha', 'missing    object    sha')
    self._check_has_member('_object_class', 'missing    object    type')
    self._check_has_member('_name', 'missing    tag    name')
    if (not self._name):
        raise ObjectFormatException('empty    tag    name')
    check_hexsha(self._object_sha, 'invalid    object    sha')
    if getattr(self, '_tagger', None):
        check_identity(self._tagger, 'invalid    tagger')
    last = None
    for (field, _) in _parse_message(self._chunked_text):
        if ((field == _OBJECT_HEADER) and (last is not None)):
            raise ObjectFormatException('unexpected    object')
        elif ((field == _TYPE_HEADER) and (last != _OBJECT_HEADER)):
            raise ObjectFormatException('unexpected    type')
        elif ((field == _TAG_HEADER) and (last != _TYPE_HEADER)):
            raise ObjectFormatException('unexpected    tag    name')
        elif ((field == _TAGGER_HEADER) and (last != _TAG_HEADER)):
            raise ObjectFormatException('unexpected    tagger')
        last = field
