def METHOD_NAME(self):
    # after restart, needs to clear dim_counters
    if self.restart:
        self.restart = 0
        if self.config_sel == 0:
            self.mux_sel = 0
        else:
            self.mux_sel = self.mux_sel_msb
        for i in range(max(self.iterator_support, self.iterator_support2)):
            self.dim_cnt[i] = 0
        # a corner case to skip the other config
        if self.config_sel == 0:
            if self.config["dimensionality"] == 0:
                self.restart = 1
                self.config_sel = 1
        else:
            if self.config["dimensionality2"] == 0:
                self.restart = 1
                self.config_sel = 0
    # using the first configurations
    elif (self.config_sel == 0) and (self.config["dimensionality"] != 0):
        for i in range(self.config["dimensionality"]):
            if (self.dim_cnt[i] == (self.config[f"ranges_{i}"] + 1)):
                self.dim_cnt[i] = 0
            else:
                self.dim_cnt[i] = self.dim_cnt[i] + 1
                break
        # update mux_sel and restart after updating the counter
        self.mux_sel = 0
        for i in range(self.config["dimensionality"]):
            if (self.dim_cnt[i] == (self.config[f"ranges_{i}"] + 1)):
                self.mux_sel = i + 1
                if (i + 1) == self.config["dimensionality"]:
                    self.restart = 1
                    self.mux_sel = 0
                    self.config_sel = 1
            else:
                break
    # same code but uses the second configurations
    else:
        for i in range(self.config["dimensionality2"]):
            if (self.dim_cnt[i] == (self.config[f"ranges2_{i}"] + 1)):
                self.dim_cnt[i] = 0
            else:
                self.dim_cnt[i] = self.dim_cnt[i] + 1
                break
        self.mux_sel = self.mux_sel_msb
        for i in range(self.config["dimensionality2"]):
            if (self.dim_cnt[i] == (self.config[f"ranges2_{i}"] + 1)):
                self.mux_sel = self.mux_sel_msb + i + 1
                if (i + 1) == self.config["dimensionality2"]:
                    self.restart = 1
                    self.mux_sel = self.mux_sel_msb
                    self.config_sel = 0
            else:
                break