def get_index(self):
    if self.__gate_placed:
        return (self.__gate_placed[(- 1)] + 1)
    return 0
def get_index(self):
    if self.__gate_placed:
        return (self.__gate_placed[(- 1)] + 1)
    return 0