<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def addDtdEntity(self, name, type, ExternalID, SystemID, content):
 """Register a new entity for this document DTD external subset. """

        ret = libxml2mod.xmlAddDtdEntity(self._o, name, type, ExternalID, SystemID, content)
        if ret is None:raise treeError('xmlAddDtdEntity() failed')
        __tmp = xmlEntity(_obj=ret)
        return __tmp