def METHOD_NAME(self, level):
    if self.command_available:
        self.py3.command_run(self._command_set(level))
        return
    if self._logind_proxy:
        brightness_max = int(Path(f"{self.device}/max_brightness").read_text())
        brightness = brightness_max * level / 100
        self._logind_proxy.SetBrightness("backlight", self.device.name, brightness)