def clean_warning_registry():
    """Safe way to reset warnings """
    warnings.resetwarnings()
    reg = "__warningregistry__"
    for mod_name, mod in list(sys.modules.items()):
        if mod_name in 'six.moves':
            continue
        if hasattr(mod, reg):
            getattr(mod, reg).clear()
dataset/ETHPy150Open trevorstephens/gplearn/gplearn/skutils/testing.py/clean_warning_registry/swapped operands of `in`