def get_layer(self, name: str=None):
        """
        Retrieves the layer by its name.
        :param name: name of the layer to retrieve. If name is None, it will retrieve the last added layer to the
        network.
        :return: layer output
        """
        if name is None:
            name = self.__last_layer_name

        return self.__layers[name]
def get_layer ( self , name : str = None ) : if name is None : name = self . __last_layer_name return self . __layers [ name ]
Retrieves the layer by its name.
        :param name: name of the layer to retrieve. If name is None, it will retrieve the last added layer to the
        network.
        :return: layer output