def add_gather_along_axis(self, name, input_names, output_name, axis=0):
        """
        Add a gather_along_axis layer to the model that gathers elements or slices
        from data and store to a tensor whose shape is defined by indices from the
        input along the given axis into the output tensor.
        Refer to the ``GatherAlongAxisLayerParams`` 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.
        axis: int, optional
            The axis the operation perform on, default: 0.

        See Also
        --------
        add_gather, add_gather_nd, add_scatter, add_scatter_nd, add_scatter_along_axis
        """

        spec_layer = self._add_generic_layer(name, input_names, [output_name])
        spec_layer.gatherAlongAxis.axis = axis
        self.rank_dict[output_name] = self._get_rank(input_names[1])
        return spec_layer

        Add a gather_along_axis layer to the model that gathers elements or slices
        from data and store to a tensor whose shape is defined by indices from the
        input along the given axis into the output tensor.
        Refer to the ``GatherAlongAxisLayerParams`` 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.
        axis: int, optional
            The axis the operation perform on, default: 0.

        See Also
        --------
        add_gather, add_gather_nd, add_scatter, add_scatter_nd, add_scatter_along_axis
        
coremltools/models/neural_network/builder.py