def list_sorted_nshash(self, h, ns, long_=False, columns=True,
                           recurse=False, prnt=False, longer=False,
                           longest=False):
        if (int, long) in type(h):
            if h == fishlib.STATUS.UNAUTHORIZED:
                return u'Permission denied.'
            else:
                return u'Error status %s' % h

        tagNames = h[u'tagNames']
        tagNames.sort()
        spaces = h[u'namespaceNames']
        spaces.sort()
        items = tagNames[:] + [u'%s/' % space for space in spaces]
        items.sort()
        if items:
            fmt = string_format(max([len(item) for item in items]))
        if recurse:
            self.Print(u'\n%s:' % ns)
        if long_ or longer or longest:
            res = []
            for item in items:
                r = self.full_perms(ns + u'/' + fmt % item, longer,
                                    longest=longest)
                res.append(r)
                if prnt:
                    self.Print(r)
            result = u'\n'.join(res)
        elif columns == False:
            result = u'\n'.join(items)
            if prnt:
                self.Print(result)
        else:
            result = to_string_grid(items)
            if prnt:
                self.Print(result)
        if recurse:
            others = u'\n'.join([self.list_sorted_ns(u'%s/%s' % (ns, space),
                                                     long_, columns, recurse,
                                                     prnt=prnt, longer=longer,
                                                     longest=longest)
                                 for space in spaces])
            return u'%s:\n%s\n\n%s' % (ns, result, others)
        else:
            return result
dataset/ETHPy150Open njr0/fish/fish/ls.py/ExtendedFluidinfo.list_sorted_nshash/swapped operands of `in`