def set_index(self, index, gate_width):
    h_pos = ((index % self.__fold) + 1)
    if ((h_pos + (gate_width - 1)) > self.__fold):
        _index = ((index + self.__fold) - (h_pos - 1))
    else:
        _index = index
    for ii in range(gate_width):
        if ((_index + ii) not in self.__gate_placed):
            self.__gate_placed.append((_index + ii))
    self.__gate_placed.sort()
def set_index(self, index, gate_width):
    h_pos = ((index % self.__fold) + 1)
    if ((h_pos + (gate_width - 1)) > self.__fold):
        _index = ((index + self.__fold) - (h_pos - 1))
    else:
        _index = index
    for ii in range(gate_width):
        if ((_index + ii) not in self.__gate_placed):
            self.__gate_placed.append((_index + ii))
    self.__gate_placed.sort()