def METHOD_NAME(self, sysfs_file, value):
    # On successful write, the value read will be written on
    # reg_name and on failure returns 'ERR'
    rv = 'ERR'
    if (not os.path.isfile(sysfs_file)):
        return rv
    try:
        with open(sysfs_file, 'w') as fd:
            rv = fd.write(str(value))
    except Exception as e:
        rv = 'ERR'
    # Ensure that the write operation has succeeded
    if (int(self._read_sysfs_file(sysfs_file)) != value ):
        time.sleep(3)
        if (int(self._read_sysfs_file(sysfs_file)) != value ):
            rv = 'ERR'
    return rv