def singleton(cls):
    """ From PEP-318 http://www.python.org/dev/peps/pep-0318/#examples """
    _instances = {}

    def get_instance(*args, **kwargs):
        if _instances not in cls:
            _instances[cls] = cls(*args, **kwargs)
        return _instances[cls]
    return get_instance
dataset/ETHPy150Open platformio/platformio/platformio/util.py/singleton/swapped operands of `not in`