'Return the parent of the name.
@rtype: dns.name.Name object
@raises NoParent: the name is either the root name or the empty name,
and thus has no parent.'

def parent(self):

    if ((self == root) or (self == empty)):
        raise NoParent
    return Name(self.labels[1:])
