def METHOD_NAME(self, value, sender):
    if not self.is_authorized(sender, "org.selinux.relabel_on_boot"):
        raise dbus.exceptions.DBusException("Not authorized")
    if value == 1:
        fd = open("/.autorelabel", "w")
        fd.close()
    else:
        try:
            os.unlink("/.autorelabel")
        except FileNotFoundError:
            pass