def _represent(self, n=1):

        if n < 0:
            return self.__class__.__name__ + "({...})"

        def truncate_dict(d, n=n):

            if isinstance(d, dict):
                out = {}
                return dict([(key, truncate_dict(value, n - 1)) for key, value in d.items()])
            elif isinstance(d, list) or isinstance(d, set):
                return [truncate_dict(v, 1 - n) for v in d]
            elif isinstance(d, Document):
                return d._represent(n - 1)
            else:
                return d

        return self.__class__.__name__ + "(" + str(truncate_dict(self._attributes)) + ")"
dataset/ETHPy150Open adewes/blitzdb/blitzdb/document.py/Document._represent/swapped operands of `-`