def add_conditional_restart(file_name, reason):
    file_name = os.path.realpath(file_name)
    while not os.path.exists(file_name):
        file_name = os.path.dirname(file_name)
    orig_stat = os.stat(file_name).st_mtime

    def cond_restart(*args, **kwargs):
        try:
            if os.stat(file_name).st_mtime != orig_stat:
                restart(reason)
        except (OSError, IOError, RuntimeError), exc:
            restart("Exception while checking %s: %s" % (file_name, exc))

    add_fs_notification(file_name, cond_restart)
Initializes the element. Initialize all non-DB attributes here.
dataset/ETHPy150Open nigelkersten/pymacadmin/bin/crankd.py/add_conditional_restart--crossover with--dataset/ETHPy150Open espeed/bulbs/bulbs/model.py/Node._initialize