@classmethod
    def format(cls, stats, format="str"):
        if format == "str":
            return cls.format_str(stats)
        elif format == "json":
            if stats in 'auc':
                return {
                    'auc': round(stats['auc'], 3)
                }
            else:
                return {k: round(ss['auc'], 3) for k, ss in stats.items()}
        else:
            raise TypeError("Format '{0}' not available for {1}."
                            .format(format, cls.__name__))
dataset/ETHPy150Open wiki-ai/revscoring/revscoring/scorer_models/test_statistics/roc.py/roc.format/swapped operands of `in`