def add_expand_dims(self, name, input_name, output_name, axes):
        """
        Add an expand dims layer to the model that increases the rank of the
        input tensor by adding unit dimensions.
        Refer to the ``ExpandDimsLayerParams`` message in the specification
        (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_name: str
            The input blob name of this layer.
        output_name: str
            The output blob name of this layer.
        axes: list of int or tuple of int
            Dimensions the operation perform on.

        See Also
        --------
        add_squeeze
        """

        spec_layer = self._add_generic_layer(name, [input_name], [output_name])
        spec_layer_params = spec_layer.expandDims
        spec_layer_params.axes.extend(axes)
        self.rank_dict[output_name] = self._get_rank(input_name) + len(axes)
        return spec_layer

        Add an expand dims layer to the model that increases the rank of the
        input tensor by adding unit dimensions.
        Refer to the ``ExpandDimsLayerParams`` message in the specification
        (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_name: str
            The input blob name of this layer.
        output_name: str
            The output blob name of this layer.
        axes: list of int or tuple of int
            Dimensions the operation perform on.

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