def METHOD_NAME(self):
    # return if no outputs are connected
    if not any(s.is_linked for s in self.outputs):
        return
    # input values lists (single or multi value)
    input_val = self.inputs["val"].sv_get()[0]
    input_b1 = self.inputs["b1"].sv_get()[0]
    input_b2 = self.inputs["b2"].sv_get()[0]
    parameters = match_long_repeat([input_val, input_b1, input_b2])
    # update the number of switches based on number of inputs
    old_switch_count = len(self.switches)
    new_switch_count = len(parameters[0])
    # did the number of switches change ? => add or remove switches
    if old_switch_count != new_switch_count:
        if new_switch_count > old_switch_count:  # add new switches
            for n in range(old_switch_count, new_switch_count):
                self.debug("creating new switch")
                switch = self.switches.add()
        else:  # remove old switches
            while len(self.switches) > new_switch_count:
                n = len(self.switches) - 1
                self.debug("removing old switch")
                self.switches.remove(n)
    # update switches
    state_list = []
    zone_list = []
    for i, params in enumerate(zip(*parameters)):
        val, b1, b2 = params
        minB = min(b1, b2)
        maxB = max(b1, b2)
        switch = self.switches[i]
        switch.update_switch(self.mode, val, minB, maxB)
        state_list.append(switch.state)
        zone_list.append(switch.zone)
    self.outputs["State"].sv_set([state_list])
    self.outputs["Zone"].sv_set([zone_list])