def auto_str(cls):
    def __str__(self):
        return '%s(%s)' % (
            type(self).__name__,
            ', '.join('%s=%s' % item for item in vars(self).items())
        )

    cls.__str__ = __str__
    return cls
dataset/ETHPy150Open knightliao/pfrock/pfrock/core/lib.py/auto_str/original