'Remove a given identity.
Arguments:
category -- The general category to which the agent belonged.
itype    -- A more specific designation with the category.
name     -- Optional human readable name for this identity.
lang     -- Optional, standard xml:lang value.'

def del_identity(self, category, itype, name=None, lang=None):

    identity = (category, itype, lang)
    if (identity in self._identities):
        self._identities.remove(identity)
        for id_xml in self.findall(('{%s}identity' % self.namespace)):
            id = (id_xml.attrib['category'], id_xml.attrib['type'], id_xml.attrib.get(('{%s}lang' % self.xml_ns), None))
            if (id == identity):
                self.xml.remove(id_xml)
                return True
    return False
