def singleton(cls):
    """ Singleton decorator """
    instances = {}

    def instance():
        if instances not in cls:
            instances[cls] = cls()
            log.debug("Loaded singleton instance of %s" % cls)
        return instances[cls]

    return instance
dataset/ETHPy150Open nacx/kahuna/kahuna/utils/singleton.py/singleton/swapped operands of `not in`