def rm_r(self, rootns):
        L = self.list_r_namespace(rootns)
        if L == fishlib.STATUS.NOT_FOUND:
            return L
        elif L[u'failures']:
            return 1            # non-zero failure code
        # First delete all the tags & sub-namespaces
        for items, fn in ((L[u'tagNames'], self.delete_abstract_tag),
                          (L[u'namespaceNames'], self.delete_namespace)):
            si = [(i.split(u'/'), i) for i in items]
            z = [(len(s), i) for (s, i) in si]
            z.sort()
            z.reverse()
            failed = 0
            for (n, i) in z:
                r = fn(u'/%s' % i)
                failed = failed or (r if r != fishlib.STATUS.NO_CONTENT
                                    else 0)
        if failed:
            return failed
        return self.delete_namespace(u'/' + rootns)
dataset/ETHPy150Open njr0/fish/fish/ls.py/ExtendedFluidinfo.rm_r/original