def add_reverse_sequence(
        self, name, input_names, output_name, batch_axis=0, seq_axis=-1
    ):
        """
        Add a reverse sequence layer to the model that reverses variable length slices.
        Refer to the ``ReverseSeqLayerParams`` message in the specification (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_names: list of str
            The input blob names of this layer.
        output_name: str
            The output blob name of this layer.
        batch_axis: int, optional
            Slices input along the dimension batch_axis, default 0.
        seq_axis: int, optional
            Reverse along the dimension seq_axis, default: -1.

        See Also
        --------
        add_reverse
        """

        spec_layer = self._add_generic_layer(name, input_names, [output_name])
        spec_layer.reverseSeq.batchAxis = batch_axis
        spec_layer.reverseSeq.sequenceAxis = seq_axis

        return spec_layer

        Add a reverse sequence layer to the model that reverses variable length slices.
        Refer to the ``ReverseSeqLayerParams`` message in the specification (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_names: list of str
            The input blob names of this layer.
        output_name: str
            The output blob name of this layer.
        batch_axis: int, optional
            Slices input along the dimension batch_axis, default 0.
        seq_axis: int, optional
            Reverse along the dimension seq_axis, default: -1.

        See Also
        --------
        add_reverse
        
coremltools/models/neural_network/builder.py