def singleton(cls, *args, **kw):
    instances = {}

    def _singleton(*args, **kw):
        if instances not in cls:
            instances[cls] = cls(*args, **kw)
        return instances[cls]
    return _singleton
dataset/ETHPy150Open charlestian/NetEaseMusic/src/base/common.py/singleton/swapped operands of `not in`