def cleanup_math_data():
    locals = console_namespace()
    if (not locals):
        return
    variables = get_math_data()
    for key in variables.keys():
        index = VarStates.get_index(key)
        if (index == (- 1)):
            continue
        state_prop = bpy.context.window_manager.MathVisStatePropList.get(key)
        if state_prop.state[1]:
            continue
        del locals[key]
        bpy.context.window_manager.MathVisStatePropList.remove(index)
def cleanup_math_data():
    locals = console_namespace()
    if (not locals):
        return
    variables = get_math_data()
    for key in variables.keys():
        index = VarStates.get_index(key)
        if (index == (- 1)):
            continue
        state_prop = bpy.context.window_manager.MathVisStatePropList.get(key)
        if state_prop.state[1]:
            continue
        del locals[key]
        bpy.context.window_manager.MathVisStatePropList.remove(index)