def METHOD_NAME(self, portname, state):
    port_idx = self._port_name_to_index(portname)
    gpio_pin = self.port_to_gpio_pin_mapping[port_idx]
    ledMode = self._port_state_to_mode(state)
    saveMode = self.gpio_led_read(gpio_pin)
    if ledMode == saveMode:
        return
    self._port_led_mode_update(gpio_pin, ledMode)
    DBG_PRINT("update {} led mode from {} to {}".format(portname, saveMode, ledMode))