def add_broadcast_to_static(self, name, input_name, output_name, output_shape):
        """
        Add a broadcast_to_static layer to the model that broadcasts a tensor
        to a compatible shape.
        Refer to the ``BroadcastToStaticLayerParams`` 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.
        output_shape: list of int or tuple of int
            The target shape of the output tensor.

        See Also
        --------
        add_broadcast_to_like, add_broadcast_to_dynamic
        """

        spec_layer = self._add_generic_layer(name, [input_name], [output_name])
        spec_layer_params = spec_layer.broadcastToStatic
        spec_layer_params.targetShape.extend(output_shape)

        self.rank_dict[output_name] = len(output_shape)
        return spec_layer

        Add a broadcast_to_static layer to the model that broadcasts a tensor
        to a compatible shape.
        Refer to the ``BroadcastToStaticLayerParams`` 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.
        output_shape: list of int or tuple of int
            The target shape of the output tensor.

        See Also
        --------
        add_broadcast_to_like, add_broadcast_to_dynamic
        
coremltools/models/neural_network/builder.py